mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
fix: Crash when trying to close providers
This commit is contained in:
@@ -70,8 +70,8 @@ namespace hex {
|
||||
}
|
||||
|
||||
static std::optional<ProviderRegion> s_currentSelection;
|
||||
void setCurrentSelection(std::optional<ProviderRegion> region) {
|
||||
s_currentSelection = std::move(region);
|
||||
void setCurrentSelection(const std::optional<ProviderRegion> ®ion) {
|
||||
s_currentSelection = region;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -353,6 +353,7 @@ namespace hex {
|
||||
|
||||
TaskManager::runWhenTasksFinished([provider] {
|
||||
EventManager::post<EventProviderDeleted>(provider);
|
||||
std::erase(impl::s_closingProviders, provider);
|
||||
delete provider;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user