sys: Fixed global shortcuts not working correctly

Fixes #606
This commit is contained in:
WerWolv
2022-07-30 22:01:49 +02:00
parent a097f162a7
commit 3d5568f65f
14 changed files with 63 additions and 30 deletions

View File

@@ -251,10 +251,17 @@ namespace hex {
}
void remove(prv::Provider *provider) {
if (provider == nullptr)
return;
if (Task::getRunningTaskCount() > 0)
return;
auto it = std::find(s_providers.begin(), s_providers.end(), provider);
if (it == s_providers.end())
return;
EventManager::post<EventProviderDeleted>(provider);
s_providers.erase(it);