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 | 9f235b58cd6dbee74d091e437d520306977daac9 (patch) | |
tree | 58e1f1953719d5ff164fb5184999ae01aa1ae59b /media/libmediaplayerservice/nuplayer/NuPlayer.cpp | |
parent | 482136a5f977056eeffe2aa58d31ce395be562a3 (diff) | |
download | frameworks_av-9f235b58cd6dbee74d091e437d520306977daac9.zip frameworks_av-9f235b58cd6dbee74d091e437d520306977daac9.tar.gz frameworks_av-9f235b58cd6dbee74d091e437d520306977daac9.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/nuplayer/NuPlayer.cpp')
-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) { |