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

Commit ab3977d2 authored by Marco Nelissen's avatar Marco Nelissen Committed by Gerrit Code Review
Browse files

Merge "MetadataRetriever: Check null pointer to avoid tombstone crash."

parents 1cec7f85 c847a483
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -262,6 +262,13 @@ static jobject android_media_MediaMetadataRetriever_getFrameAtTime(JNIEnv *env,
                            width,
                            height,
                            config);
    if (jBitmap == NULL) {
        if (env->ExceptionCheck()) {
            env->ExceptionClear();
        }
        ALOGE("getFrameAtTime: create Bitmap failed!");
        return NULL;
    }

    SkBitmap *bitmap =
            (SkBitmap *) env->GetLongField(jBitmap, fields.nativeBitmap);