diff --git a/app_check/src/FirebaseAppCheck.cs b/app_check/src/FirebaseAppCheck.cs index 7a3bca00..7cfc4457 100644 --- a/app_check/src/FirebaseAppCheck.cs +++ b/app_check/src/FirebaseAppCheck.cs @@ -162,12 +162,14 @@ private static void GetTokenFromCSharpMethod(string appName, int key) { AppCheckUtil.FinishGetTokenCallback(key, "", 0, (int)AppCheckError.InvalidConfiguration, "Missing IAppCheckProviderFactory."); + return; } FirebaseApp app = FirebaseApp.GetInstance(appName); if (app == null) { AppCheckUtil.FinishGetTokenCallback(key, "", 0, (int)AppCheckError.Unknown, "Unable to find App with name: " + appName); + return; } IAppCheckProvider provider; if (!providerMap.TryGetValue(app.Name, out provider)) { @@ -176,6 +178,7 @@ private static void GetTokenFromCSharpMethod(string appName, int key) { AppCheckUtil.FinishGetTokenCallback(key, "", 0, (int)AppCheckError.InvalidConfiguration, "Failed to create IAppCheckProvider for App: " + appName); + return; } providerMap[app.Name] = provider; } diff --git a/docs/readme.md b/docs/readme.md index 9a86ecd9..4a910025 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -71,6 +71,11 @@ Support Release Notes ------------- +### Upcoming +- Changes + - App Check: Fixed a crash when there are errors creating a provider. + ([#877](https://github.com/firebase/firebase-unity-sdk/issues/877)) + ### 11.5.0 - Changes - General: Update to Firebase C++ SDK version 11.5.0.