From cde1f285d04df5a6f474a8a10faf1d0560307408 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 17 Mar 2010 07:22:04 +0000 Subject: [PATCH] Added a more user friendly messagebox when network errors are encountered. --- source/glest_game/main/program.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/glest_game/main/program.cpp b/source/glest_game/main/program.cpp index c5ec68c4c..7f4799ce1 100644 --- a/source/glest_game/main/program.cpp +++ b/source/glest_game/main/program.cpp @@ -338,14 +338,14 @@ void Program::showMessage(const char *msg) { //if(Socket::enableDebugText) printf("In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__); ProgramState *originalState = NULL; - if(programState) { + if(this->programState) { //delete programState; - originalState = programState; + originalState = this->programState; } //if(Socket::enableDebugText) printf("In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__); - programState = new ShowMessageProgramState(this, msg); + this->programState = new ShowMessageProgramState(this, msg); //if(Socket::enableDebugText) printf("In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__); @@ -355,11 +355,15 @@ void Program::showMessage(const char *msg) { //if(Socket::enableDebugText) printf("In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__); - delete programState; + delete this->programState; + this->programState = NULL; //if(Socket::enableDebugText) printf("In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__); - programState = originalState; + init(window); + //setState(originalState); + this->programState = originalState; + //if(Socket::enableDebugText) printf("In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__); }