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

Commit cb0b755e authored by John Grossman's avatar John Grossman
Browse files

Add a missing NULL check.

Don't crash if its time to start the next media player in a media
player chain, but the current player's client has a NULL mAudioOutput,
as is the case when the low level player implements
MediaPlayerHWInterface.

Change-Id: If555da3a46960cbee91ff26e5b1fd05e52c8ef28
parent 9a150640
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1046,6 +1046,7 @@ void MediaPlayerService::Client::notify(
    {
        Mutex::Autolock l(client->mLock);
        if (msg == MEDIA_PLAYBACK_COMPLETE && client->mNextClient != NULL) {
            if (client->mAudioOutput != NULL)
                client->mAudioOutput->switchToNextOutput();
            client->mNextClient->start();
            client->mNextClient->mClient->notify(MEDIA_INFO, MEDIA_INFO_STARTED_AS_NEXT, 0, obj);