From 2e629a662d5b180ef35d32bd63e5dd0e1fcf266c Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 11 Mar 2006 19:01:05 +0000 Subject: MORE BUGS GRR git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3676 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/userprocess.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/userprocess.cpp b/src/userprocess.cpp index 7dc169108..00b086893 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -317,13 +317,13 @@ void DoSocketTimeouts(time_t TIME) for (std::vector::iterator a = module_sockets.begin(); a < module_sockets.end(); a++) { InspSocket* s = (InspSocket*)*a; - if (s->Timeout(TIME)) + if ((s) && (socket_ref[s->GetFd()] != NULL) && (s->Timeout(TIME))) { log(DEBUG,"userprocess.cpp: Socket poll returned false, close and bail"); - SE->DelFd(s->GetFd()); socket_ref[s->GetFd()] = NULL; - s->Close(); + SE->DelFd(s->GetFd()); module_sockets.erase(a); + s->Close(); delete s; break; } -- cgit v1.2.3