From 9836c19dd5c70e6be5e176e41d006fdb17615164 Mon Sep 17 00:00:00 2001 From: Mykhailo Pylyp Date: Fri, 18 Jun 2021 13:40:10 +0300 Subject: [PATCH] [Run-Plugin][Program] Fix null reference exception on Dispose (#11785) --- .../Microsoft.PowerToys.Run.Plugin.WindowsSettings/Main.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Main.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Main.cs index dfc9b2296..9c6fabbf1 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Main.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Main.cs @@ -169,7 +169,7 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings return; } - if (!(_context is null)) + if (_context != null && _context.API != null) { _context.API.ThemeChanged -= OnThemeChanged; }