diff options
author | James Dong <jdong@google.com> | 2012-09-14 15:34:35 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2012-09-14 15:34:35 -0700 |
commit | 376074ed1c3c368aeb336954a07632cd806288e2 (patch) | |
tree | 0e3fed53f5ab460e1a65a18a8826af1deea0267f /media/libmediaplayerservice | |
parent | b845c6b0c3066d6791973be830f0953477461a65 (diff) | |
download | frameworks_av-376074ed1c3c368aeb336954a07632cd806288e2.zip frameworks_av-376074ed1c3c368aeb336954a07632cd806288e2.tar.gz frameworks_av-376074ed1c3c368aeb336954a07632cd806288e2.tar.bz2 |
Fixed a native crash due to deref of a NULL pointer
We only checked the mNativeWindow against NULL, but did not check the native window object itself against NULL.
o related-to-bug: 7153683
Change-Id: I430d344dc09a2fc337bf51001551627056713773
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index dc1e351..1ddf775 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -963,7 +963,8 @@ sp<AMessage> NuPlayer::Source::getFormat(bool audio) { status_t NuPlayer::setVideoScalingMode(int32_t mode) { mVideoScalingMode = mode; - if (mNativeWindow != NULL) { + if (mNativeWindow != NULL + && mNativeWindow->getNativeWindow() != NULL) { status_t ret = native_window_set_scaling_mode( mNativeWindow->getNativeWindow().get(), mVideoScalingMode); if (ret != OK) { |