diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2014-04-24 11:23:35 +0800 |
---|---|---|
committer | cretin45 <cretin45@gmail.com> | 2014-12-15 14:46:44 -0800 |
commit | ef94003e56f93cc6c1b95472a8623e5e573f26bf (patch) | |
tree | 6cc18dc1923a0aebc9ebd3f58cffcf7fa7802999 | |
parent | 20ce3978aae939d7a28bed33910806c2aaf344a4 (diff) | |
download | android_packages_apps_Gallery2-ef94003e56f93cc6c1b95472a8623e5e573f26bf.tar.gz android_packages_apps_Gallery2-ef94003e56f93cc6c1b95472a8623e5e573f26bf.tar.bz2 android_packages_apps_Gallery2-ef94003e56f93cc6c1b95472a8623e5e573f26bf.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-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; |