summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 51c68aeff..d3f8e9a21 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -2896,7 +2896,9 @@ class TreeSocket : public InspSocket
chanrec* chan = Srv->FindChannel(params[0]);
if (user && chan)
{
- chan->ServerKickUser(user, params[2].c_str(), false);
+ if (!chan->ServerKickUser(user, params[2].c_str(), false))
+ /* Yikes, the channels gone! */
+ delete chan;
}
}
if (this->InboundServerName != "")