From 4b459da1ee3bb52ddfcc649dc2686975a9d72ab7 Mon Sep 17 00:00:00 2001 From: Wei Jia Date: Tue, 30 Aug 2016 13:49:06 -0700 Subject: MediaPlayerService: allow next player to be NULL Bug: 31155917 Bug: 30204103 Change-Id: I9a2a59ddb900fc942e7c19b31b53a110d790474c (cherry picked from commit 282841278723166e74039329ca56e444ad472daf) --- media/libmediaplayerservice/MediaPlayerService.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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& playe ALOGV("setNextPlayer"); Mutex::Autolock l(mLock); sp c = static_cast(player.get()); - if (!mService->hasClient(c)) { + if (c != NULL && !mService->hasClient(c)) { return BAD_VALUE; } -- cgit v1.1