diff --git a/source/glest_game/network/connection_slot.cpp b/source/glest_game/network/connection_slot.cpp index 5929ffcc..22495c9b 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);