diff options
author | Sadie Powell <sadie@witchery.services> | 2020-12-04 15:32:02 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-12-04 15:56:59 +0000 |
commit | 414e65c75b95dd51e226ef9758e9260197c21da6 (patch) | |
tree | 7ef4cd5770accfe8d96c71a329e0486c70b07b80 | |
parent | 18e46ce87dae88f48269f03b01b93cfe598b247b (diff) |
Fire service deregistration events properly.
-rw-r--r-- | src/modules.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 77e4142b3..b6a29fcfa 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -409,7 +409,10 @@ void ModuleManager::DoSafeUnload(Module* mod) { std::multimap<std::string, ServiceProvider*>::iterator curr = i++; if (curr->second->creator == mod) + { DataProviders.erase(curr); + FOREACH_MOD(OnServiceDel, (*curr->second)); + } } dynamic_reference_base::reset_all(); @@ -599,7 +602,7 @@ void ModuleManager::DelService(ServiceProvider& item) case SERVICE_IOHOOK: { DelReferent(&item); - return; + break; } default: throw ModuleException("Cannot delete unknown service type"); |