summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-04-24 11:23:35 +0800
committeremancebo <emancebo@cyngn.com>2014-09-04 10:40:20 -0700
commite53b45177b18093bd45020a24a51b9b22df7223c (patch)
treec0bb2a0eafb67ad7d6d902ddad90420168622194
parent540ee64af3c76989da0d32be632c6bf9e3697697 (diff)
downloadandroid_packages_apps_Gallery2-e53b45177b18093bd45020a24a51b9b22df7223c.tar.gz
android_packages_apps_Gallery2-e53b45177b18093bd45020a24a51b9b22df7223c.tar.bz2
android_packages_apps_Gallery2-e53b45177b18093bd45020a24a51b9b22df7223c.zip
Gallery2: Fix Gallery crash when exit playing gif pic.
When we press back key to exit playing gif pic,the decoder is free and set to null,which casuse this bug happened. Add a condition to avoid the NullPointerException. CRs-fixed: 653709 Change-Id: Iab299554c252c3a1c9352b498cd946cb53e47cc7
-rwxr-xr-xsrc/com/android/gallery3d/util/GIFView.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/util/GIFView.java b/src/com/android/gallery3d/util/GIFView.java
index 3fdd0a535..51434bc5a 100755
--- a/src/com/android/gallery3d/util/GIFView.java
+++ b/src/com/android/gallery3d/util/GIFView.java
@@ -174,6 +174,9 @@ public class GIFView extends ImageView implements GifAction {
if (!isShown() || mRedrawHandler == null) {
break;
}
+ if (mGifDecoder == null) {
+ return;
+ }
GifFrame frame = mGifDecoder.next();
mCurrentImage = frame.mImage;