summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJason Simmons <jsimmons@google.com>2011-08-12 13:46:55 -0700
committerJason Simmons <jsimmons@google.com>2011-08-12 13:46:55 -0700
commitd9792ac752f10a865efe2742b600b4448a821dca (patch)
tree2ff83038165418746141143402e4b0ef56c8463e /media
parente1fec2408b41cdbc39003398c38537ef95af94ab (diff)
downloadframeworks_base-d9792ac752f10a865efe2742b600b4448a821dca.zip
frameworks_base-d9792ac752f10a865efe2742b600b4448a821dca.tar.gz
frameworks_base-d9792ac752f10a865efe2742b600b4448a821dca.tar.bz2
Add a null check to handle failure of android::createPlayer
Change-Id: Id56bd0c16104e46d8dc71f13d8a44aefe251fad4
Diffstat (limited to 'media')
-rw-r--r--media/libmediaplayerservice/MediaPlayerService.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 8630ec1..2051b3b 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -687,7 +687,9 @@ sp<MediaPlayerBase> MediaPlayerService::Client::createPlayer(player_type playerT
p = android::createPlayer(playerType, this, notify);
}
- p->setUID(mUID);
+ if (p != NULL) {
+ p->setUID(mUID);
+ }
return p;
}