From 439843a2f3e57632924a3e77a7bb15f19a07ee7d Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 27 Aug 2006 00:43:33 +0000 Subject: Sometimes we were just doing Route->GetSock(), without first checking Route was non-null. Instead, do "if (Route && Route->GetSock())" in a few places. This should make stuff water-tight git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5027 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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::dequeGetSocket()) && (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::dequeGetChild(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 { FullLine = FullLine + " " + params[x]; } - if (Route->GetSocket()) + if (Route && Route->GetSocket()) { TreeSocket* Sock = Route->GetSocket(); Sock->WriteLine(FullLine); -- cgit v1.2.3