From 64c58b9f1941a29fa0fda5af76de26785fdea1a9 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 7 Feb 2020 20:20:37 -0800 Subject: [PATCH] Fixed NullPointerException --- .../app/src/main/java/org/libsdl/app/SDLActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 95a14e6d4..9b872cd07 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 @@ -1625,7 +1625,7 @@ class SDLMain implements Runnable { Log.v("SDL", "Finished main function"); - if (SDLActivity.mSingleton.isFinishing()) { + if (SDLActivity.mSingleton == null || SDLActivity.mSingleton.isFinishing()) { // Activity is already being destroyed } else { // Let's finish the Activity