From 9c3008fad16fa4d53ee62a87a846f4e32b697a91 Mon Sep 17 00:00:00 2001 From: Josef Nemec Date: Wed, 9 Nov 2022 12:50:55 +0100 Subject: [PATCH] Fix: Some Fullscreen themes causing crash on startup --- source/Playnite.FullscreenApp/Controls/Views/Main.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Playnite.FullscreenApp/Controls/Views/Main.cs b/source/Playnite.FullscreenApp/Controls/Views/Main.cs index 4d8aa2e1e..f019f82d0 100644 --- a/source/Playnite.FullscreenApp/Controls/Views/Main.cs +++ b/source/Playnite.FullscreenApp/Controls/Views/Main.cs @@ -251,9 +251,9 @@ public override void OnApplyTemplate() AssignButtonWithCommand(ref ButtonProgramUpdate, "PART_ButtonProgramUpdate", mainModel.OpenUpdatesCommand); AssignButtonWithCommand(ref ButtonMainMenu, "PART_ButtonMainMenu", mainModel.OpenMainMenuCommand); AssignButtonWithCommand(ref ButtonNotifications, "PART_ButtonNotifications", mainModel.OpenNotificationsMenuCommand); - AutomationProperties.SetName(ButtonProgramUpdate, LOC.UpdateIsAvailableNotificationBody.GetLocalized()); - AutomationProperties.SetName(ButtonMainMenu, LOC.ApplicationMenu.GetLocalized()); - AutomationProperties.SetName(ButtonNotifications, LOC.Notifications.GetLocalized()); + if (ButtonProgramUpdate != null) AutomationProperties.SetName(ButtonProgramUpdate, LOC.UpdateIsAvailableNotificationBody.GetLocalized()); + if (ButtonMainMenu != null) AutomationProperties.SetName(ButtonMainMenu, LOC.ApplicationMenu.GetLocalized()); + if (ButtonNotifications != null) AutomationProperties.SetName(ButtonNotifications, LOC.Notifications.GetLocalized()); if (ButtonProgramUpdate != null) {