summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-12-04 15:32:02 +0000
committerSadie Powell <sadie@witchery.services>2020-12-04 15:56:59 +0000
commit414e65c75b95dd51e226ef9758e9260197c21da6 (patch)
tree7ef4cd5770accfe8d96c71a329e0486c70b07b80
parent18e46ce87dae88f48269f03b01b93cfe598b247b (diff)
Fire service deregistration events properly.
-rw-r--r--src/modules.cpp5
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");