am 9568b4cd: am 376074ed: Fixed a native crash due to deref of a NULL pointer
* commit '9568b4cdc8d2a7896e9c031f2b6cdf6f18210de1':
Fixed a native crash due to deref of a NULL pointer
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index c09f86f..756e76a 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -961,7 +961,8 @@
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) {