summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2016-08-30 13:49:06 -0700
committergitbuildkicker <android-build@google.com>2016-08-30 17:52:09 -0700
commitf42ee8bd0cb51c571dd6dfcf71c61dce377768cd (patch)
tree50f99efda1059b481ae208ed512bd7a048448c5e
parent089104004f5aeb2634764c56b948ef83318a9f95 (diff)
downloadframeworks_av-f42ee8bd0cb51c571dd6dfcf71c61dce377768cd.zip
frameworks_av-f42ee8bd0cb51c571dd6dfcf71c61dce377768cd.tar.gz
frameworks_av-f42ee8bd0cb51c571dd6dfcf71c61dce377768cd.tar.bz2
MediaPlayerService: allow next player to be NULL
Bug: 31155917 Bug: 30204103 Change-Id: I9a2a59ddb900fc942e7c19b31b53a110d790474c (cherry picked from commit 282841278723166e74039329ca56e444ad472daf)
-rw-r--r--media/libmediaplayerservice/MediaPlayerService.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 0483228..f802de1 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -1062,7 +1062,7 @@ status_t MediaPlayerService::Client::setNextPlayer(const sp<IMediaPlayer>& playe
ALOGV("setNextPlayer");
Mutex::Autolock l(mLock);
sp<Client> c = static_cast<Client*>(player.get());
- if (!mService->hasClient(c)) {
+ if (c != NULL && !mService->hasClient(c)) {
return BAD_VALUE;
}