mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Fixed crash if mSurface isn't set up when we pause the application
This commit is contained in:
parent
81f7e0c1f7
commit
45536710f3
@ -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…
Reference in New Issue
Block a user