summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2014-05-01 15:28:14 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-01 15:28:14 +0000
commitab962b54e3eac4ffadb5ea4e4948df10e6201468 (patch)
tree33f5801e9c796a39a277fd93fef38b28b608fc27 /media
parent5dca099df7100c531e111b50435605c318f1e6d4 (diff)
parentab3977d21161815c130bdedf21e2571382d208da (diff)
downloadframeworks_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.cpp7
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);