Fixed infinite recursion at startup on Android

This commit is contained in:
Sam Lantinga
2024-09-20 10:55:31 -07:00
parent 88a01fbc96
commit 095fb5f522

View File

@@ -122,7 +122,12 @@ SDL_Environment *SDL_CreateEnvironment(bool populated)
#else
#ifdef SDL_PLATFORM_ANDROID
// Make sure variables from the application manifest are available
Android_JNI_GetManifestEnvironmentVariables();
static bool initializing;
if (!initializing) {
initializing = true;
Android_JNI_GetManifestEnvironmentVariables();
initializing = false;
}
#endif
char **strings = environ;
if (strings) {