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

Commit 4235c6de authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Fix potential NULL pointer crash

Bug: 111407253
Test: manual

Change-Id: Ie76f0e5df4fac84f8bf949ab8b0e81122e92bf35
parent b4e880ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -83,13 +83,13 @@ status_t MediaTrackCUnwrapper::read(MediaBufferBase **buffer, const ReadOptions


    uint32_t opts = 0;
    uint32_t opts = 0;


    if (options->getNonBlocking()) {
    if (options && options->getNonBlocking()) {
        opts |= CMediaTrackReadOptions::NONBLOCKING;
        opts |= CMediaTrackReadOptions::NONBLOCKING;
    }
    }


    int64_t seekPosition = 0;
    int64_t seekPosition = 0;
    MediaTrack::ReadOptions::SeekMode seekMode;
    MediaTrack::ReadOptions::SeekMode seekMode;
    if (options->getSeekTo(&seekPosition, &seekMode)) {
    if (options && options->getSeekTo(&seekPosition, &seekMode)) {
        opts |= SEEK;
        opts |= SEEK;
        opts |= (uint32_t) seekMode;
        opts |= (uint32_t) seekMode;
    }
    }