From 33642b47b28bbb326d347f49c8ce6cde42168eff Mon Sep 17 00:00:00 2001 From: Sylvain Becker Date: Fri, 8 May 2020 21:50:23 +0200 Subject: [PATCH] Android: robustness if locale failed to be detected at start --- .../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 f051d965a..df58b7173 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 @@ -423,7 +423,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh Log.v(TAG, "onConfigurationChanged()"); super.onConfigurationChanged(newConfig); - if (!mCurrentLocale.equals(newConfig.locale)) { + if (mCurrentLocale == null || !mCurrentLocale.equals(newConfig.locale)) { mCurrentLocale = newConfig.locale; SDLActivity.onNativeLocaleChanged(); }