소스 검색

Fixed NullPointerException if there's no singleton

Sam Lantinga 7 년 전
부모
커밋
c179d3948a
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      android-project/app/src/main/java/org/libsdl/app/SDLActivity.java

+ 3 - 1
android-project/app/src/main/java/org/libsdl/app/SDLActivity.java

@@ -520,7 +520,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
     /* The native thread has finished */
     public static void handleNativeExit() {
         SDLActivity.mSDLThread = null;
-        mSingleton.finish();
+        if (mSingleton != null) {
+            mSingleton.finish();
+        }
     }