From 53f266a35ff6201d606a4e8f66f0c6cccb630891 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 25 Apr 2016 13:12:03 +0200 Subject: m_spanningtree Don't try to call the OnServerSplit hook when the module is being unloaded --- src/modules/m_spanningtree/treeserver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index 48f16c9df..1fc9455b0 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -159,7 +159,8 @@ void TreeServer::FinishBurst() void TreeServer::SQuitChild(TreeServer* server, const std::string& reason) { - FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), SpanningTreeEventListener, OnServerSplit, (server)); + if (!Utils->Creator->dying) + FOREACH_MOD_CUSTOM(Utils->Creator->GetEventProvider(), SpanningTreeEventListener, OnServerSplit, (server)); stdalgo::erase(Children, server); if (IsRoot()) -- cgit v1.2.3