diff --git a/lib/libimhex/source/api/imhex_api.cpp b/lib/libimhex/source/api/imhex_api.cpp index 1e16f42d6..49a180c10 100644 --- a/lib/libimhex/source/api/imhex_api.cpp +++ b/lib/libimhex/source/api/imhex_api.cpp @@ -462,7 +462,7 @@ namespace hex { if (s_providers->empty()) EventProviderChanged::post(provider, nullptr); - EventProviderClosed::post(it->get()); + EventProviderClosed::post(providerToRemove); RequestUpdateWindowTitle::post(); // Do the destruction of the provider in the background once all tasks have finished