1
0
mirror of synced 2024-11-12 02:00:52 +01:00

fix: Crash on exit

This commit is contained in:
WerWolv 2024-01-09 11:49:49 +01:00
parent dd9a2e1818
commit 179a65ed8b
2 changed files with 7 additions and 2 deletions

View File

@ -167,6 +167,10 @@ namespace hex::crash {
HANDLE_SIGNAL(SIGABRT); HANDLE_SIGNAL(SIGABRT);
HANDLE_SIGNAL(SIGFPE); HANDLE_SIGNAL(SIGFPE);
#if defined (SIGBUS)
HANDLE_SIGNAL(SIGBUS);
#endif
#undef HANDLE_SIGNAL #undef HANDLE_SIGNAL
} }

View File

@ -67,11 +67,12 @@ namespace hex::init {
EventImHexClosing::post(); EventImHexClosing::post();
EventManager::clear(); EventManager::clear();
while (ImHexApi::Provider::isValid())
ImHexApi::Provider::remove(ImHexApi::Provider::get());
// Terminate all asynchronous tasks // Terminate all asynchronous tasks
TaskManager::exit(); TaskManager::exit();
while (ImHexApi::Provider::isValid())
ImHexApi::Provider::remove(ImHexApi::Provider::get());
ContentRegistry::Provider::impl::getEntries().clear(); ContentRegistry::Provider::impl::getEntries().clear();
ImHexApi::System::getInitArguments().clear(); ImHexApi::System::getInitArguments().clear();