From 721164e5623714749128538731eaf2854921a9d9 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 15 Dec 2024 21:44:36 +0100 Subject: [PATCH] fix: Deinitialization order --- main/gui/source/init/run/native.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/main/gui/source/init/run/native.cpp b/main/gui/source/init/run/native.cpp index eb261a3fd..f11cffc53 100644 --- a/main/gui/source/init/run/native.cpp +++ b/main/gui/source/init/run/native.cpp @@ -27,14 +27,13 @@ handleFileOpenRequest(); } - // Clean up everything after the main window is closed - ON_SCOPE_EXIT { - deinitializeImHex(); - }; - // Main window - Window window; - window.loop(); + { + Window window; + window.loop(); + } + + deinitializeImHex(); } while (shouldRestart);