summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/misccommands.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-12-18 00:55:22 +0000
committerSadie Powell <sadie@witchery.services>2020-12-18 01:10:13 +0000
commitb618b194f3166a55ca7e7889c7346b65c174d397 (patch)
treeb563f6adb012081e216e0e8043bc074597895114 /src/modules/m_spanningtree/misccommands.cpp
parentba4a23e248d7d4d54d204bc4b5e20580bfbf7616 (diff)
Don't call events provided by dying or dead modules.
Diffstat (limited to 'src/modules/m_spanningtree/misccommands.cpp')
-rw-r--r--src/modules/m_spanningtree/misccommands.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/misccommands.cpp b/src/modules/m_spanningtree/misccommands.cpp
index c9f86d696..bba05b1fc 100644
--- a/src/modules/m_spanningtree/misccommands.cpp
+++ b/src/modules/m_spanningtree/misccommands.cpp
@@ -26,12 +26,18 @@
void CmdBuilder::FireEvent(Server* target, const char* cmd, ClientProtocol::TagMap& taglist)
{
+ if (!Utils->Creator || Utils->Creator->dying)
+ return;
+
FOREACH_MOD_CUSTOM(Utils->Creator->GetMessageEventProvider(), ServerProtocol::MessageEventListener, OnBuildMessage, (target, cmd, taglist));
UpdateTags();
}
void CmdBuilder::FireEvent(User* target, const char* cmd, ClientProtocol::TagMap& taglist)
{
+ if (!Utils->Creator || Utils->Creator->dying)
+ return;
+
FOREACH_MOD_CUSTOM(Utils->Creator->GetMessageEventProvider(), ServerProtocol::MessageEventListener, OnBuildMessage, (target, cmd, taglist));
UpdateTags();
}