diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2014-04-24 11:23:35 +0800 |
---|---|---|
committer | emancebo <emancebo@cyngn.com> | 2014-09-04 10:40:20 -0700 |
commit | e53b45177b18093bd45020a24a51b9b22df7223c (patch) | |
tree | c0bb2a0eafb67ad7d6d902ddad90420168622194 /src/com/android/gallery3d/util/GIFView.java | |
parent | 540ee64af3c76989da0d32be632c6bf9e3697697 (diff) | |
download | android_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
Diffstat (limited to 'src/com/android/gallery3d/util/GIFView.java')
-rwxr-xr-x | src/com/android/gallery3d/util/GIFView.java | 3 |
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; |