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

Commit db09dbcb authored by Daniel Bonnevier's avatar Daniel Bonnevier Committed by Edward Savage-Jones
Browse files

Add a null check in RTSPSource::stop

This was causing a nullpointer dereference in stop.

Bug: 170643945
Test: pass cts tests
Change-Id: I17966dcae10136bf114b1b1e2446e9ea051f8517
parent 7ec362b7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -146,7 +146,9 @@ void NuPlayer::RTSPSource::stop() {
    }

    // Close socket before posting message to RTSPSource message handler.
    if (mHandler != NULL) {
        close(mHandler->getARTSPConnection()->getSocket());
    }

    sp<AMessage> msg = new AMessage(kWhatDisconnect, this);