summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjinwu <jinwu@codeaurora.org>2017-03-07 16:49:25 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-07 02:48:16 -0800
commit044ae841cbf745ae06823703e54ca9641e901728 (patch)
treeefb25e925400a748087353808b799f9a838fb4b4 /src
parent0dfa18a94a76c0c0752f3f827ee25307c2534fb8 (diff)
downloadandroid_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.java4
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);
}