From ad84f3a7b3b409ceab920f480dadcfe6eda62c92 Mon Sep 17 00:00:00 2001 From: Thog Date: Sun, 29 Dec 2019 23:37:54 +0100 Subject: [PATCH] Fix GUI freeze wehn closing without any emulation running (#853) --- Ryujinx.HLE/HOS/Horizon.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Ryujinx.HLE/HOS/Horizon.cs b/Ryujinx.HLE/HOS/Horizon.cs index 67f427b7c..2e5b7a704 100644 --- a/Ryujinx.HLE/HOS/Horizon.cs +++ b/Ryujinx.HLE/HOS/Horizon.cs @@ -766,13 +766,13 @@ namespace Ryujinx.HLE.HOS foreach (KProcess process in Processes.Values) { process.Terminate(); - - // Exit ourself now! - Scheduler.ExitThread(terminationThread); - Scheduler.GetCurrentThread().Exit(); - Scheduler.RemoveThread(terminationThread); } } + + // Exit ourself now! + Scheduler.ExitThread(terminationThread); + Scheduler.GetCurrentThread().Exit(); + Scheduler.RemoveThread(terminationThread); }); terminationThread.Start();