diff options
-rw-r--r-- | src/modules/m_spanningtree.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 316d5b03d..78a1ebb04 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -3167,7 +3167,7 @@ bool DoOneToAllButSenderRaw(std::string data, std::string omit, std::string pref for (unsigned int x = 0; x < items; x++) { TreeServer* Route = TreeRoot->GetChild(x); - if ((Route->GetSocket()) && (Route->GetName() != omit) && (omitroute != Route)) + if ((Route) && (Route->GetSocket()) && (Route->GetName() != omit) && (omitroute != Route)) { TreeSocket* Sock = Route->GetSocket(); Sock->WriteLine(data); @@ -3193,7 +3193,7 @@ bool DoOneToAllButSender(std::string prefix, std::string command, std::deque<std // The route has a socket (its a direct connection) // The route isnt the one to be omitted // The route isnt the path to the one to be omitted - if ((Route->GetSocket()) && (Route->GetName() != omit) && (omitroute != Route)) + if ((Route) && (Route->GetSocket()) && (Route->GetName() != omit) && (omitroute != Route)) { TreeSocket* Sock = Route->GetSocket(); Sock->WriteLine(FullLine); @@ -3214,7 +3214,7 @@ bool DoOneToMany(std::string prefix, std::string command, std::deque<std::string for (unsigned int x = 0; x < items; x++) { TreeServer* Route = TreeRoot->GetChild(x); - if (Route->GetSocket()) + if (Route && Route->GetSocket()) { TreeSocket* Sock = Route->GetSocket(); Sock->WriteLine(FullLine); @@ -3248,7 +3248,7 @@ bool DoOneToOne(std::string prefix, std::string command, std::deque<std::string> { FullLine = FullLine + " " + params[x]; } - if (Route->GetSocket()) + if (Route && Route->GetSocket()) { TreeSocket* Sock = Route->GetSocket(); Sock->WriteLine(FullLine); |