Fixed crash if mSurface isn't set up when we pause the application
diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
index 3d6832e..7807fc7 100644
--- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
+++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
@@ -354,7 +354,8 @@ public class SDLActivity extends Activity {
// Try a transition to paused state
if (mNextNativeState == NativeState.PAUSED) {
nativePause();
- mSurface.handlePause();
+ if (mSurface != null)
+ mSurface.handlePause();
mCurrentNativeState = mNextNativeState;
return;
}