Don't crash on exit from SDLActivity if we don't have a singleton for some reason. (Thanks Rachel!)
authorSam Lantinga <slouken@libsdl.org>
Thu, 07 Jun 2018 17:07:05 -0700
changeset 12013270e17c85d11
parent 12012 6de756c9975a
child 12014 8af8c17eaf82
Don't crash on exit from SDLActivity if we don't have a singleton for some reason. (Thanks Rachel!)
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	Thu Jun 07 17:07:03 2018 -0700
     1.2 +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Thu Jun 07 17:07:05 2018 -0700
     1.3 @@ -427,7 +427,10 @@
     1.4      /* The native thread has finished */
     1.5      public static void handleNativeExit() {
     1.6          SDLActivity.mSDLThread = null;
     1.7 -        mSingleton.finish();
     1.8 +
     1.9 +        // Make sure we currently have a singleton before we try to call it.
    1.10 +        if (mSingleton != null)
    1.11 +            mSingleton.finish();
    1.12      }
    1.13  
    1.14