Fixed crash if mSurface isn't set up when we pause the application

This commit is contained in:
Sam Lantinga 2017-10-24 00:04:40 -07:00
parent 81f7e0c1f7
commit 45536710f3
1 changed files with 2 additions and 1 deletions

View File

@ -354,6 +354,7 @@ public class SDLActivity extends Activity {
// Try a transition to paused state
if (mNextNativeState == NativeState.PAUSED) {
nativePause();
if (mSurface != null)
mSurface.handlePause();
mCurrentNativeState = mNextNativeState;
return;