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!");