Fixed crash if mSurface isn't set up when we pause the application
This commit is contained in:
parent
f3da7593a5
commit
6cba336d1c
1 changed files with 2 additions and 1 deletions
|
@ -354,7 +354,8 @@ public class SDLActivity extends Activity {
|
||||||
// Try a transition to paused state
|
// Try a transition to paused state
|
||||||
if (mNextNativeState == NativeState.PAUSED) {
|
if (mNextNativeState == NativeState.PAUSED) {
|
||||||
nativePause();
|
nativePause();
|
||||||
mSurface.handlePause();
|
if (mSurface != null)
|
||||||
|
mSurface.handlePause();
|
||||||
mCurrentNativeState = mNextNativeState;
|
mCurrentNativeState = mNextNativeState;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue