diff options
author | jinwu <jinwu@codeaurora.org> | 2017-03-07 16:49:25 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-03-07 02:48:16 -0800 |
commit | 044ae841cbf745ae06823703e54ca9641e901728 (patch) | |
tree | efb25e925400a748087353808b799f9a838fb4b4 /src | |
parent | 0dfa18a94a76c0c0752f3f827ee25307c2534fb8 (diff) | |
download | android_packages_apps_Gallery2-044ae841cbf745ae06823703e54ca9641e901728.tar.gz android_packages_apps_Gallery2-044ae841cbf745ae06823703e54ca9641e901728.tar.bz2 android_packages_apps_Gallery2-044ae841cbf745ae06823703e54ca9641e901728.zip |
Fix NPE of GLView was deleted
Check the root view for these decoded tiles are upload to show.
If null then return.
Change-Id: I6c72d26e631ff0baca60a7016f668850dc22048d
CRs-Fixed: 2015198
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/gallery3d/ui/TileImageView.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/ui/TileImageView.java b/src/com/android/gallery3d/ui/TileImageView.java index 05bc9aff5..f07353ed2 100644 --- a/src/com/android/gallery3d/ui/TileImageView.java +++ b/src/com/android/gallery3d/ui/TileImageView.java @@ -470,6 +470,10 @@ public class TileImageView extends GLView { } void queueForUpload(Tile tile) { + // if getGLRoot retun null, then maybe no place to show + // these decode tiles. + if (getGLRoot() == null) + return; synchronized (this) { mUploadQueue.push(tile); } |