Merge "MetadataRetriever: Check null pointer to avoid tombstone crash."
This commit is contained in:
@ -262,6 +262,13 @@ static jobject android_media_MediaMetadataRetriever_getFrameAtTime(JNIEnv *env,
|
|||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
config);
|
config);
|
||||||
|
if (jBitmap == NULL) {
|
||||||
|
if (env->ExceptionCheck()) {
|
||||||
|
env->ExceptionClear();
|
||||||
|
}
|
||||||
|
ALOGE("getFrameAtTime: create Bitmap failed!");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
SkBitmap *bitmap =
|
SkBitmap *bitmap =
|
||||||
(SkBitmap *) env->GetLongField(jBitmap, fields.nativeBitmap);
|
(SkBitmap *) env->GetLongField(jBitmap, fields.nativeBitmap);
|
||||||
|
Reference in New Issue
Block a user