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

Commit 95ec2cda authored by Arun Johnson's avatar Arun Johnson
Browse files

Fix potential nullptr dereference

Bug: 274011701

Change-Id: I1b40fd68295b37965aa4025ba93cc4dcdd9adaf2
parent 68e2566e
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -240,6 +240,9 @@ sp<IMemory> FrameDecoder::getMetadataOnly(


    sp<IMemory> metaMem =
    sp<IMemory> metaMem =
            allocMetaFrame(trackMeta, width, height, tileWidth, tileHeight, dstBpp, bitDepth);
            allocMetaFrame(trackMeta, width, height, tileWidth, tileHeight, dstBpp, bitDepth);
    if (metaMem == nullptr) {
        return NULL;
    }


    // try to fill sequence meta's duration based on average frame rate,
    // try to fill sequence meta's duration based on average frame rate,
    // default to 33ms if frame rate is unavailable.
    // default to 33ms if frame rate is unavailable.