From ceae23eab13c07c233c90d0e91ade8ac224cc741 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 7 Jan 2023 22:43:44 +0100 Subject: [PATCH] fix: Crash when opening a project file when already having providers open --- lib/libimhex/source/api/project_file_manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libimhex/source/api/project_file_manager.cpp b/lib/libimhex/source/api/project_file_manager.cpp index b2882e57e..7f375637e 100644 --- a/lib/libimhex/source/api/project_file_manager.cpp +++ b/lib/libimhex/source/api/project_file_manager.cpp @@ -36,7 +36,8 @@ namespace hex { return false; } - for (const auto &provider : ImHexApi::Provider::getProviders()) { + auto providers = auto(ImHexApi::Provider::getProviders()); + for (const auto &provider : providers) { ImHexApi::Provider::remove(provider); }