fix: Crash when closing providers too quickly

This commit is contained in:
WerWolv
2022-12-27 11:35:20 +01:00
parent 4b6a75fb60
commit 4b8e275254
5 changed files with 35 additions and 5 deletions

View File

@@ -322,7 +322,9 @@ namespace hex {
provider->close();
EventManager::post<EventProviderClosed>(provider);
delete provider;
TaskManager::runWhenTasksFinished([provider] {
delete provider;
});
}
prv::Provider* createProvider(const std::string &unlocalizedName, bool skipLoadInterface) {