diff options
author | Marco Nelissen <marcone@google.com> | 2014-05-01 15:28:14 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-01 15:28:14 +0000 |
commit | ab962b54e3eac4ffadb5ea4e4948df10e6201468 (patch) | |
tree | 33f5801e9c796a39a277fd93fef38b28b608fc27 /media | |
parent | 5dca099df7100c531e111b50435605c318f1e6d4 (diff) | |
parent | ab3977d21161815c130bdedf21e2571382d208da (diff) | |
download | frameworks_base-ab962b54e3eac4ffadb5ea4e4948df10e6201468.zip frameworks_base-ab962b54e3eac4ffadb5ea4e4948df10e6201468.tar.gz frameworks_base-ab962b54e3eac4ffadb5ea4e4948df10e6201468.tar.bz2 |
am ab3977d2: Merge "MetadataRetriever: Check null pointer to avoid tombstone crash."
* commit 'ab3977d21161815c130bdedf21e2571382d208da':
MetadataRetriever: Check null pointer to avoid tombstone crash.
Diffstat (limited to 'media')
-rw-r--r-- | media/jni/android_media_MediaMetadataRetriever.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/media/jni/android_media_MediaMetadataRetriever.cpp b/media/jni/android_media_MediaMetadataRetriever.cpp index 6176f0f..c2694f1 100644 --- a/media/jni/android_media_MediaMetadataRetriever.cpp +++ b/media/jni/android_media_MediaMetadataRetriever.cpp @@ -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); |