Fixed crash if mSurface isn't set up when we pause the application
authorSam Lantinga <slouken@libsdl.org>
Tue, 24 Oct 2017 00:04:40 -0700
changeset 11652c3bf2954de06
parent 11651 bfeaa433980c
child 11653 4130b92b6be4
Fixed crash if mSurface isn't set up when we pause the application
android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
     1.1 --- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Mon Oct 23 23:35:04 2017 -0700
     1.2 +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Tue Oct 24 00:04:40 2017 -0700
     1.3 @@ -354,7 +354,8 @@
     1.4          // Try a transition to paused state
     1.5          if (mNextNativeState == NativeState.PAUSED) {
     1.6              nativePause();
     1.7 -            mSurface.handlePause();
     1.8 +            if (mSurface != null)
     1.9 +                mSurface.handlePause();
    1.10              mCurrentNativeState = mNextNativeState;
    1.11              return;
    1.12          }