From 8f8787b2e0c8f1c4c51493035fb959fc6a3ed817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Sto=C5=A1i=C4=87?= Date: Tue, 4 Aug 2020 14:33:07 +0200 Subject: [PATCH] Fixed Launcher not exiting when PT is terminated (#5588) * Fixed Launcher not exiting when PT is terminated * Added a null check to _hotkeyManager as well --- src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs b/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs index a59feebd8a..0e7c167bc4 100644 --- a/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs +++ b/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs @@ -827,8 +827,8 @@ namespace PowerLauncher.ViewModel { _hotkeyManager.UnregisterHotkey(_hotkeyHandle); } - _hotkeyManager.Dispose(); - _updateSource.Dispose(); + _hotkeyManager?.Dispose(); + _updateSource?.Dispose(); _disposed = true; } }