diff options
author | Joe Onorato <joeo@android.com> | 2010-03-23 11:26:28 -0400 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2010-03-23 11:26:28 -0400 |
commit | c5210eb3845e14cdef8de6df625060778e974f1d (patch) | |
tree | 29dcbde1a1349d5b72f41002cdfb3bfc2e14a009 /src | |
parent | 878f086f754c26d096134e35c33483800585ad2b (diff) | |
download | android_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.java | 14 |
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 { |