Skip to content

Commit 57d29a5

Browse files
authored
Merge 5989e57 into 94df73a
2 parents 94df73a + 5989e57 commit 57d29a5

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

app/src/app_android.cc

+7-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,13 @@ static jobject GetPlatformAppByName(JNIEnv* jni_env, const char* name) {
311311
name_string);
312312
jni_env->DeleteLocalRef(name_string);
313313
}
314-
jni_env->ExceptionCheck();
314+
if (jni_env->ExceptionCheck()) {
315+
// Explicitly set `platform_app` to `NULL` if an exception was thrown
316+
// because on KitKat (API 19) `CallStaticObjectMethod()` may return garbage
317+
// instead of `NULL` if an exception was thrown, and callers of this
318+
// function expect `NULL` to be returned if the app was not found.
319+
platform_app = NULL; // NOLINT
320+
}
315321
jni_env->ExceptionClear();
316322
return platform_app;
317323
}

release_build_files/readme.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,10 @@ code.
378378
API.
379379
- Remote Config(Android): Fix for getting Remote Config instance for a
380380
specific app object.
381-
([#991](https://github.com/firebase/quickstart-unity/issues/991).
381+
([#991](https://github.com/firebase/quickstart-unity/issues/991)).
382+
- General (Android): Fixed a potential SIGABRT when an app was created
383+
with a non-default app name on Android KitKat
384+
([#429](https://github.com/firebase/firebase-cpp-sdk/pull/429)).
382385

383386
### 7.3.0
384387
- Changes

0 commit comments

Comments
 (0)
close