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

Commit 2b5a68b7 authored by Andrew Lewis's avatar Andrew Lewis
Browse files

Add a null check in RTSPSource::stop

This was causing a null pointer dereference in stop.

Manual backport of aosp/1456267.

Bug: 170643945
Bug: 177500688
Test: backport of aosp/1456267, tested in CTS
Change-Id: I8c771cd68663ebb9df79584ba5dd4edb6636bdbd
parent 1a44b343
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -146,7 +146,9 @@ void NuPlayer::RTSPSource::stop() {
    }
    }


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


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