From 17f9ee84b3a5ab8a15a62db75b6a0288d67216d8 Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Fri, 4 Jun 2021 10:13:56 -0700 Subject: [PATCH] null checking the callbacks (#11592) Co-authored-by: Clint Rutkas --- deps/spdlog | 2 +- .../Views/ShellPage.xaml.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/deps/spdlog b/deps/spdlog index 616866fcf4..cbe9448650 160000 --- a/deps/spdlog +++ b/deps/spdlog @@ -1 +1 @@ -Subproject commit 616866fcf40340ea25a8f218369bad810ef58e72 +Subproject commit cbe9448650176797739dbab13961ef4c07f4290f diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml.cs index 7ec85b843c..110104ee75 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml.cs @@ -83,19 +83,20 @@ namespace Microsoft.PowerToys.Settings.UI.Views public static int SendDefaultIPCMessage(string msg) { - DefaultSndMSGCallback(msg); + DefaultSndMSGCallback?.Invoke(msg); return 0; } public static int SendCheckForUpdatesIPCMessage(string msg) { - CheckForUpdatesMsgCallback(msg); + CheckForUpdatesMsgCallback?.Invoke(msg); + return 0; } public static int SendRestartAdminIPCMessage(string msg) { - SndRestartAsAdminMsgCallback(msg); + SndRestartAsAdminMsgCallback?.Invoke(msg); return 0; }