Commit 616827ae6472351ee3b923da95106e686c4617c7

Sam Lantinga 2017-12-19T11:19:10

Fixed bug 4001 - Android, prevent error message box to crash Sylvain Prevent the error message box to crash after being clicked. Because of "SDLActivity.mSingleton.finish();"

1
2
3
4
5
6
7
8
9
10
11
12
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 0714b77..b91c613 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
@@ -166,6 +166,7 @@ public class SDLActivity extends Activity {
 
         if (mBrokenLibraries)
         {
+            mSingleton = this;
             AlertDialog.Builder dlgAlert  = new AlertDialog.Builder(this);
             dlgAlert.setMessage("An error occurred while trying to start the application. Please try again and/or reinstall."
                   + System.getProperty("line.separator")