From f4d1049be4493cf162ec06e9166a0d953d88961f Mon Sep 17 00:00:00 2001 From: WerWolv Date: Tue, 30 Jan 2024 16:32:48 +0100 Subject: [PATCH] fix: More build errors --- lib/libimhex/source/api/task_manager.cpp | 1 + main/gui/source/init/tasks.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libimhex/source/api/task_manager.cpp b/lib/libimhex/source/api/task_manager.cpp index 138d8afb1..41c344bfd 100644 --- a/lib/libimhex/source/api/task_manager.cpp +++ b/lib/libimhex/source/api/task_manager.cpp @@ -11,6 +11,7 @@ #if defined(OS_WINDOWS) #include #include + #include #else #include #endif diff --git a/main/gui/source/init/tasks.cpp b/main/gui/source/init/tasks.cpp index ffaf6c5e1..973f1c238 100644 --- a/main/gui/source/init/tasks.cpp +++ b/main/gui/source/init/tasks.cpp @@ -73,7 +73,7 @@ namespace hex::init { // By wrapping the object in a AutoReset, the `EventImHexClosing` event will automatically handle clearing the object // while the heap is still valid. // The heap stays valid right up to the point where `PluginManager::unload()` is called. - EventAbnormalTermination::post([] { + EventAbnormalTermination::subscribe([](int) { log::fatal("A crash happened while cleaning up resources during exit!"); log::fatal("This is most certainly because WerWolv again forgot to mark a heap allocated object as 'AutoReset'."); log::fatal("Please report this issue on the ImHex GitHub page!");