Changeset - r13029:d6cdd1e2b288
[Not reviewed]
master
0 2 0
smatz - 15 years ago 2009-09-14 19:30:13
smatz@openttd.org
(svn r17537) -Fix: don't crash while printing gamelog in crash handler if we crashed before while gamelog action was active
2 files changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/crashlog.cpp
Show inline comments
 
@@ -211,9 +211,7 @@ bool CrashLog::WriteSavegame(char *filen
 
	if (_m == NULL) return false;
 

	
 
	try {
 
		GamelogStartAction(GLAT_EMERGENCY);
 
		GamelogEmergency();
 
		GamelogStopAction();
 

	
 
		seprintf(filename, filename_last, "%scrash.sav", _personal_dir);
 

	
src/gamelog.cpp
Show inline comments
 
@@ -334,8 +334,11 @@ static LoggedChange *GamelogChange(Gamel
 
 */
 
void GamelogEmergency()
 
{
 
	assert(_gamelog_action_type == GLAT_EMERGENCY);
 
	/* Terminate any active action */
 
	if (_gamelog_action_type != GLAT_NONE) GamelogStopAction();
 
	GamelogStartAction(GLAT_EMERGENCY);
 
	GamelogChange(GLCT_EMERGENCY);
 
	GamelogStopAction();
 
}
 

	
 
/** Finds out if current game is a loaded emergency savegame.
0 comments (0 inline, 0 general)