diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2014-04-24 11:23:35 +0800 |
---|---|---|
committer | Xiaojing Zhang <zhangx@codeaurora.org> | 2014-11-04 20:38:26 -0800 |
commit | 767f128a9b34e0c46aa7c9db5ce04ea2b164f2f4 (patch) | |
tree | 6cc18dc1923a0aebc9ebd3f58cffcf7fa7802999 /src | |
parent | 8782b321e4996e8948febdd02ca76af4d9d43085 (diff) | |
download | android_packages_apps_Gallery2-767f128a9b34e0c46aa7c9db5ce04ea2b164f2f4.tar.gz android_packages_apps_Gallery2-767f128a9b34e0c46aa7c9db5ce04ea2b164f2f4.tar.bz2 android_packages_apps_Gallery2-767f128a9b34e0c46aa7c9db5ce04ea2b164f2f4.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')
-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 fd4a5b269..86003fb31 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; |