mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 04:02:30 +01:00
- attempt to fix pizza's crash
This commit is contained in:
parent
2204e0577c
commit
c42d44a53a
@ -919,8 +919,8 @@ void Game::init(bool initForPreviewOnly) {
|
||||
world.init(this, gameSettings.getDefaultUnits());
|
||||
}
|
||||
catch(const exception &ex) {
|
||||
char szBuf[4096]="";
|
||||
sprintf(szBuf,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
char szBuf[8096]="";
|
||||
sprintf(szBuf,"In [%s::%s Line: %d]\nError [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,szBuf);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,szBuf);
|
||||
|
@ -262,14 +262,17 @@ void World::init(Game *game, bool createUnits, bool initFactions){
|
||||
char szErrBuf[8096]="";
|
||||
|
||||
try {
|
||||
if(createUnits){
|
||||
if(createUnits) {
|
||||
initUnits();
|
||||
}
|
||||
}
|
||||
catch(const std::exception &ex) {
|
||||
//printf("***A\n");
|
||||
gotError = true;
|
||||
sprintf(szErrBuf,"In [%s::%s %d] error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
sprintf(szErrBuf,"In [%s::%s %d]\nerror [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,szErrBuf);
|
||||
|
||||
//printf("***B\n");
|
||||
}
|
||||
|
||||
if(loadWorldNode != NULL) {
|
||||
@ -1676,7 +1679,7 @@ void World::initUnits() {
|
||||
}
|
||||
catch(const std::exception &ex) {
|
||||
gotError = true;
|
||||
sprintf(szErrBuf,"In [%s::%s %d] error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
sprintf(szErrBuf,"In [%s::%s %d]\nerror [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
|
||||
SystemFlags::OutputDebug(SystemFlags::debugError,szErrBuf);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user