Fix 2519335 - Caused by NPE. Here's another place where it needs to be ok for sRS to be null.

Change-Id: Iacfc0474c96c657d982a50c8d4851e2fdd79c3ae
This commit is contained in:
Joe Onorato 2010-03-23 11:26:28 -04:00
parent 878f086f75
commit c5210eb384
1 changed files with 10 additions and 4 deletions

View File

@ -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 {