From dc0315d0d6cceccbb7da1055b7714a3e3dea2191 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Thu, 3 Jun 2010 23:00:31 +0000 Subject: [PATCH] bugfix in server connection slot shutdown processing, only update server listener if BEFORE game started, not after game exits --- source/glest_game/network/connection_slot.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/glest_game/network/connection_slot.cpp b/source/glest_game/network/connection_slot.cpp index 9a281ba84..b23543762 100644 --- a/source/glest_game/network/connection_slot.cpp +++ b/source/glest_game/network/connection_slot.cpp @@ -511,6 +511,7 @@ void ConnectionSlot::close() { SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s LINE: %d]\n",__FILE__,__FUNCTION__,__LINE__); + bool updateServerListener = (socket != NULL); delete socket; socket= NULL; @@ -520,7 +521,7 @@ void ConnectionSlot::close() { //chatSender.clear(); //chatTeamIndex= -1; - if(ready == false) { + if(updateServerListener == true && ready == false) { SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s LINE: %d]\n",__FILE__,__FUNCTION__,__LINE__); serverInterface->updateListen(); }