From b618b194f3166a55ca7e7889c7346b65c174d397 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 18 Dec 2020 00:55:22 +0000 Subject: Don't call events provided by dying or dead modules. --- src/modules/m_spanningtree/misccommands.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/modules/m_spanningtree') 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(); } -- cgit v1.2.3