Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ac48df1 authored by xndcn's avatar xndcn
Browse files

Fix incorrect NULL check in IncFsFileMap reference assertions

Since IncFsFileMap&& is not a pointer type, the check should
verify the validity of its underlying data.

Change-Id: Ica43ab671831b3e3bb61472e0446aa6dbf51ba91
parent 2a6357c5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -453,7 +453,7 @@ status_t _FileAsset::openChunk(incfs::IncFsFileMap&& dataMap, base::unique_fd fd
{
    assert(mFp == NULL);    // no reopen
    assert(!mMap.has_value());
    assert(dataMap != NULL);
    assert(dataMap.data());

    mMap = std::move(dataMap);
    mStart = -1;            // not used
@@ -798,7 +798,7 @@ status_t _CompressedAsset::openChunk(incfs::IncFsFileMap&& dataMap, size_t uncom
{
    assert(mFd < 0);        // no re-open
    assert(!mMap.has_value());
    assert(dataMap != NULL);
    assert(dataMap.data());

    mMap = std::move(dataMap);
    mStart = -1;        // not used