From fc31e7713dcb55032decbf97c3bb505efc337cfe Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 20 Aug 2010 20:29:30 +0000 Subject: [PATCH] - added null pointer check --- source/glest_game/network/connection_slot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/glest_game/network/connection_slot.cpp b/source/glest_game/network/connection_slot.cpp index 5929ffcc9..22495c9b6 100644 --- a/source/glest_game/network/connection_slot.cpp +++ b/source/glest_game/network/connection_slot.cpp @@ -262,7 +262,7 @@ void ConnectionSlot::update(bool checkForNewClients) { this->clearChatInfo(); bool gotTextMsg = true; - for(;socket->hasDataToRead() == true && gotTextMsg == true;) { + for(;socket != NULL && socket->hasDataToRead() == true && gotTextMsg == true;) { SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] polling for networkMessageType...\n",__FILE__,__FUNCTION__,__LINE__); NetworkMessageType networkMessageType= getNextMessageType(true);