summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-02-12 21:52:42 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-02-12 21:52:42 +0000
commitc70c723cf8a892fb4be2f5917e596d79dfb3cb91 (patch)
tree39ed45cee047736db6b53236357d7cf4fa5156fa /core/java/android
parentc65d26ee0e3792fc17c156c48e62b24f242e0c8d (diff)
parent637314d15c2dacc2d5daeecf17dc668ce405b25c (diff)
downloadframeworks_base-c70c723cf8a892fb4be2f5917e596d79dfb3cb91.zip
frameworks_base-c70c723cf8a892fb4be2f5917e596d79dfb3cb91.tar.gz
frameworks_base-c70c723cf8a892fb4be2f5917e596d79dfb3cb91.tar.bz2
Merge "Avoid crash if layer is destroyed after GLRenderer"
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/GLRenderer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/view/GLRenderer.java b/core/java/android/view/GLRenderer.java
index 40ad72c..c1eb6b7 100644
--- a/core/java/android/view/GLRenderer.java
+++ b/core/java/android/view/GLRenderer.java
@@ -497,7 +497,9 @@ public class GLRenderer extends HardwareRenderer {
@Override
void onLayerDestroyed(HardwareLayer layer) {
- mGlCanvas.cancelLayerUpdate(layer);
+ if (mGlCanvas != null) {
+ mGlCanvas.cancelLayerUpdate(layer);
+ }
mAttachedLayers.remove(layer);
}