fix: Crash when trying to close providers
This commit is contained in:
parent
498d8c1d65
commit
c35ea228e4
@ -74,7 +74,7 @@ namespace hex {
|
|||||||
std::map<u32, Tooltip> &getTooltips();
|
std::map<u32, Tooltip> &getTooltips();
|
||||||
std::map<u32, TooltipFunction> &getTooltipFunctions();
|
std::map<u32, TooltipFunction> &getTooltipFunctions();
|
||||||
|
|
||||||
void setCurrentSelection(std::optional<ProviderRegion> region);
|
void setCurrentSelection(const std::optional<ProviderRegion> ®ion);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -70,8 +70,8 @@ namespace hex {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static std::optional<ProviderRegion> s_currentSelection;
|
static std::optional<ProviderRegion> s_currentSelection;
|
||||||
void setCurrentSelection(std::optional<ProviderRegion> region) {
|
void setCurrentSelection(const std::optional<ProviderRegion> ®ion) {
|
||||||
s_currentSelection = std::move(region);
|
s_currentSelection = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -353,6 +353,7 @@ namespace hex {
|
|||||||
|
|
||||||
TaskManager::runWhenTasksFinished([provider] {
|
TaskManager::runWhenTasksFinished([provider] {
|
||||||
EventManager::post<EventProviderDeleted>(provider);
|
EventManager::post<EventProviderDeleted>(provider);
|
||||||
|
std::erase(impl::s_closingProviders, provider);
|
||||||
delete provider;
|
delete provider;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user