diff options
author | Marco Nelissen <marcone@google.com> | 2014-05-01 15:32:17 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-01 15:32:17 +0000 |
commit | 4375e84882a9a84b0012cf9504a30ede6ef72c1f (patch) | |
tree | 0cb7cfceff76b29d355d379c8a33f9e1ce616d16 /media/jni | |
parent | 531381056fac077cffcd509b1e89d9b41f400fca (diff) | |
parent | ab962b54e3eac4ffadb5ea4e4948df10e6201468 (diff) | |
download | frameworks_base-4375e84882a9a84b0012cf9504a30ede6ef72c1f.zip frameworks_base-4375e84882a9a84b0012cf9504a30ede6ef72c1f.tar.gz frameworks_base-4375e84882a9a84b0012cf9504a30ede6ef72c1f.tar.bz2 |
am ab962b54: am ab3977d2: Merge "MetadataRetriever: Check null pointer to avoid tombstone crash."
* commit 'ab962b54e3eac4ffadb5ea4e4948df10e6201468':
MetadataRetriever: Check null pointer to avoid tombstone crash.
Diffstat (limited to 'media/jni')
-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); |