diff options
author | John Grossman <johngro@google.com> | 2012-08-23 17:47:31 -0700 |
---|---|---|
committer | John Grossman <johngro@google.com> | 2012-08-23 17:47:31 -0700 |
commit | cb0b755efc2cd24703f400729994900bf2117f66 (patch) | |
tree | 21d73848006bb14b4de9fcfe56fa0a1befd09868 /media/libmediaplayerservice/MediaPlayerService.cpp | |
parent | 9a150640a28d3fa5507a590125a6c004681bb221 (diff) | |
download | frameworks_av-cb0b755efc2cd24703f400729994900bf2117f66.zip frameworks_av-cb0b755efc2cd24703f400729994900bf2117f66.tar.gz frameworks_av-cb0b755efc2cd24703f400729994900bf2117f66.tar.bz2 |
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
Diffstat (limited to 'media/libmediaplayerservice/MediaPlayerService.cpp')
-rw-r--r-- | media/libmediaplayerservice/MediaPlayerService.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 8620856..58e4723 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -1046,7 +1046,8 @@ void MediaPlayerService::Client::notify( { Mutex::Autolock l(client->mLock); if (msg == MEDIA_PLAYBACK_COMPLETE && client->mNextClient != NULL) { - client->mAudioOutput->switchToNextOutput(); + if (client->mAudioOutput != NULL) + client->mAudioOutput->switchToNextOutput(); client->mNextClient->start(); client->mNextClient->mClient->notify(MEDIA_INFO, MEDIA_INFO_STARTED_AS_NEXT, 0, obj); } |