summaryrefslogtreecommitdiff
path: root/src/gamelog.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-09-14 19:30:13 +0000
committersmatz <smatz@openttd.org>2009-09-14 19:30:13 +0000
commitd6f4cda74e7f10160ec28b965dc605cf914f3444 (patch)
tree250dbe20b12a5be3dd680664fdea78ff8b3c9e54 /src/gamelog.cpp
parent8deb7efcc763508d69ed5c1de2a415901373050f (diff)
downloadopenttd-d6f4cda74e7f10160ec28b965dc605cf914f3444.tar.xz
(svn r17537) -Fix: don't crash while printing gamelog in crash handler if we crashed before while gamelog action was active
Diffstat (limited to 'src/gamelog.cpp')
-rw-r--r--src/gamelog.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gamelog.cpp b/src/gamelog.cpp
index d98895526..ed6cdfa8c 100644
--- a/src/gamelog.cpp
+++ b/src/gamelog.cpp
@@ -334,8 +334,11 @@ static LoggedChange *GamelogChange(GamelogChangeType ct)
*/
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.