mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r1778) - Fix: [ 1115200 ] In the main menu, when starting a new game while the load game dialog is open, openttd asserts.
This commit is contained in:
parent
0601293edb
commit
f42e8ac3d2
@ -1259,8 +1259,8 @@ static void SaveLoadDlgWndProc(Window *w, WindowEvent *e)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WE_DESTROY:
|
case WE_DESTROY:
|
||||||
// pause is only used in single-player, non-editor mode
|
// pause is only used in single-player, non-editor mode, non menu mode
|
||||||
if(!_networking && (_game_mode != GM_EDITOR))
|
if(!_networking && (_game_mode != GM_EDITOR) && (_game_mode != GM_MENU))
|
||||||
DoCommandP(0, 0, 0, NULL, CMD_PAUSE);
|
DoCommandP(0, 0, 0, NULL, CMD_PAUSE);
|
||||||
_query_string_active = false;
|
_query_string_active = false;
|
||||||
FiosFreeSavegameList();
|
FiosFreeSavegameList();
|
||||||
@ -1350,7 +1350,8 @@ void ShowSaveLoadDialog(int mode)
|
|||||||
strcpy(_edit_str_buf, "UNNAMED");
|
strcpy(_edit_str_buf, "UNNAMED");
|
||||||
}
|
}
|
||||||
|
|
||||||
// pause is only used in single-player, non-editor mode
|
// pause is only used in single-player, non-editor mode, non-menu mode. It
|
||||||
|
// will be unpaused in the WE_DESTROY event handler.
|
||||||
if(_game_mode != GM_MENU && !_networking && _game_mode != GM_EDITOR)
|
if(_game_mode != GM_MENU && !_networking && _game_mode != GM_EDITOR)
|
||||||
DoCommandP(0, 1, 0, NULL, CMD_PAUSE);
|
DoCommandP(0, 1, 0, NULL, CMD_PAUSE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user