Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 376074ed authored by James Dong's avatar James Dong
Browse files

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
parent b845c6b0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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) {