From 136562b7663c05b03c2848c187ee456ca624f169 Mon Sep 17 00:00:00 2001 From: Arjun Balgovind <32061677+arjunbalgovind@users.noreply.github.com> Date: Tue, 4 Aug 2020 21:06:07 -0700 Subject: [PATCH] Fixed exceptions in dispose not allowing PT Run to terminate (#5615) --- src/modules/launcher/PowerLauncher/App.xaml.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/modules/launcher/PowerLauncher/App.xaml.cs b/src/modules/launcher/PowerLauncher/App.xaml.cs index 99b253d290..5165df0e98 100644 --- a/src/modules/launcher/PowerLauncher/App.xaml.cs +++ b/src/modules/launcher/PowerLauncher/App.xaml.cs @@ -60,8 +60,15 @@ namespace PowerLauncher { RunnerHelper.WaitForPowerToysRunner(_powerToysPid, () => { - Dispose(); - Environment.Exit(0); + try + { + Dispose(); + } + finally + { + + Environment.Exit(0); + } }); var bootTime = new System.Diagnostics.Stopwatch();