summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-05-05 09:52:22 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-05-05 09:52:22 +0000
commit4b0c3014f317361ea9fb4cb89b9629bb415c78db (patch)
tree98908c5b7a212d1bc9a992ce618f524f12fcbfac
parent0e74a337265b2e8384f75deab816ae92f532ff08 (diff)
Fixed crash that only slug can replicate
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@789 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/inspircd.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 018bdf133..cb1e5cea7 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -3333,7 +3333,8 @@ int InspIRCd(void)
for (int x = 0; x != UDPportCount; x++)
{
- FD_SET(me[x]->fd, &serverfds);
+ if (me[x])
+ FD_SET(me[x]->fd, &serverfds);
}
tvs.tv_usec = 0;
@@ -3344,7 +3345,7 @@ int InspIRCd(void)
{
for (int x = 0; x != UDPportCount; x++)
{
- if (FD_ISSET (me[x]->fd, &serverfds))
+ if ((me[x]) && (FD_ISSET (me[x]->fd, &serverfds)))
{
char remotehost[MAXBUF],resolved[MAXBUF];
length = sizeof (client);
@@ -3365,7 +3366,7 @@ int InspIRCd(void)
{
std::deque<std::string> msgs;
msgs.clear();
- if (me[x]->RecvPacket(msgs, tcp_host))
+ if ((me[x]) && (me[x]->RecvPacket(msgs, tcp_host)))
{
for (int ctr = 0; ctr < msgs.size(); ctr++)
{