diff --git a/Microsoft.Toolkit.Uwp.Notifications/Toasts/Compat/Desktop/Win32AppInfo.cs b/Microsoft.Toolkit.Uwp.Notifications/Toasts/Compat/Desktop/Win32AppInfo.cs index b4fabd2d43d..49b516dd64e 100644 --- a/Microsoft.Toolkit.Uwp.Notifications/Toasts/Compat/Desktop/Win32AppInfo.cs +++ b/Microsoft.Toolkit.Uwp.Notifications/Toasts/Compat/Desktop/Win32AppInfo.cs @@ -126,7 +126,7 @@ private static string HashAppId(string appId) private static string GetDisplayNameFromCurrentProcess(Process process) { // If AssemblyTitle is set, use that - var assemblyTitleAttr = Assembly.GetEntryAssembly().GetCustomAttribute(); + var assemblyTitleAttr = Assembly.GetEntryAssembly()?.GetCustomAttribute(); if (assemblyTitleAttr != null) { return assemblyTitleAttr.Title;