From 5084009d6220e71dc5f6544bf6e568ef6d948591 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 1 Feb 2025 20:10:13 +0100 Subject: [PATCH] fix: Invalid iterator dereference when removing providers --- lib/libimhex/source/api/imhex_api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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