- attempt to fix crash on windows when server exits game

This commit is contained in:
Mark Vejvoda 2013-01-09 01:53:00 +00:00
parent 67be884d25
commit 779ab1348f

View File

@ -154,6 +154,7 @@ void ClientInterface::update() {
Chrono chrono;
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
try {
NetworkMessageCommandList networkMessageCommandList(currentFrameCount);
//send as many commands as we can
@ -190,6 +191,18 @@ void ClientInterface::update() {
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 1) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took %lld msecs\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis());
}
}
catch(const megaglest_runtime_error &ex) {
if(this->isConnected() == false) {
string sErr = string(extractFileFromDirectoryPath(__FILE__).c_str()) + "::" + string(__FUNCTION__) + " network error: " + string(ex.what());
DisplayErrorMessage(sErr);
quit= true;
}
else {
throw megaglest_runtime_error(ex.what());
}
}
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 1) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took %lld msecs\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis());
}