From 04ede99d142104d888ed98bdd937acb855664301 Mon Sep 17 00:00:00 2001 From: Peter M <34331512+pmaytak@users.noreply.github.com> Date: Mon, 19 Sep 2022 13:01:04 -0700 Subject: [PATCH] Fix null pointer in logging. (#192) --- .../MsalCacheHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.Identity.Client.Extensions.Msal/MsalCacheHelper.cs b/src/Microsoft.Identity.Client.Extensions.Msal/MsalCacheHelper.cs index 3b770ad..f8c84b5 100644 --- a/src/Microsoft.Identity.Client.Extensions.Msal/MsalCacheHelper.cs +++ b/src/Microsoft.Identity.Client.Extensions.Msal/MsalCacheHelper.cs @@ -533,7 +533,7 @@ private static void LogMessage(IIdentityLogger identityLogger, EventLogLevel lev //Log to Identity Logger LogEntry logEntry = new LogEntry() { Message = message, EventLogLevel = level }; - identityLogger.Log(logEntry); + identityLogger?.Log(logEntry); } } }