diff options
-rw-r--r-- | src/crashlog.cpp | 2 | ||||
-rw-r--r-- | src/gamelog.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/crashlog.cpp b/src/crashlog.cpp index af2bd69fd..2a46866d1 100644 --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -211,9 +211,7 @@ bool CrashLog::WriteSavegame(char *filename, const char *filename_last) const if (_m == NULL) return false; try { - GamelogStartAction(GLAT_EMERGENCY); GamelogEmergency(); - GamelogStopAction(); seprintf(filename, filename_last, "%scrash.sav", _personal_dir); 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. |