summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2010-03-23 11:26:28 -0400
committerJoe Onorato <joeo@android.com>2010-03-23 11:26:28 -0400
commitc5210eb3845e14cdef8de6df625060778e974f1d (patch)
tree29dcbde1a1349d5b72f41002cdfb3bfc2e14a009 /src
parent878f086f754c26d096134e35c33483800585ad2b (diff)
downloadandroid_packages_apps_Trebuchet-c5210eb3845e14cdef8de6df625060778e974f1d.tar.gz
android_packages_apps_Trebuchet-c5210eb3845e14cdef8de6df625060778e974f1d.tar.bz2
android_packages_apps_Trebuchet-c5210eb3845e14cdef8de6df625060778e974f1d.zip
Fix 2519335 - Caused by NPE. Here's another place where it needs to be ok for sRS to be null.
Change-Id: Iacfc0474c96c657d982a50c8d4851e2fdd79c3ae
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/AllApps3D.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/launcher2/AllApps3D.java b/src/com/android/launcher2/AllApps3D.java
index 8467b3953..d81b44297 100644
--- a/src/com/android/launcher2/AllApps3D.java
+++ b/src/com/android/launcher2/AllApps3D.java
@@ -194,8 +194,10 @@ public class AllApps3D extends RSSurfaceView
}
public void surrender() {
- sRS.contextSetSurface(0, 0, null);
- sRS.mMessageCallback = null;
+ if (sRS != null) {
+ sRS.contextSetSurface(0, 0, null);
+ sRS.mMessageCallback = null;
+ }
mSurrendered = true;
}
@@ -1022,11 +1024,15 @@ public class AllApps3D extends RSSurfaceView
}
void pause() {
- sRS.contextBindRootScript(null);
+ if (sRS != null) {
+ sRS.contextBindRootScript(null);
+ }
}
void resume() {
- sRS.contextBindRootScript(mScript);
+ if (sRS != null) {
+ sRS.contextBindRootScript(mScript);
+ }
}
class Params extends BaseAlloc {