From 46e562527887679c422c7bdc32efe4634c20670e Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 7 Sep 2009 12:13:33 +0000 Subject: (svn r17452) -Fix (r17450): emergency savegames weren't rejected by the crash logger anymore --- src/os/windows/crashlog_win.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/os/windows/crashlog_win.cpp b/src/os/windows/crashlog_win.cpp index 4919fa683..68eaf3419 100644 --- a/src/os/windows/crashlog_win.cpp +++ b/src/os/windows/crashlog_win.cpp @@ -17,6 +17,7 @@ #include "../../string_func.h" #include "../../fileio_func.h" #include "../../strings_func.h" +#include "../../gamelog.h" #include @@ -366,6 +367,14 @@ static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep) ExitProcess(2); } + if (GamelogTestEmergency()) { + static const TCHAR _emergency_crash[] = + _T("A serious fault condition occured in the game. The game will shut down.\n") + _T("As you loaded an emergency savegame no crash information will be generated.\n"); + MessageBox(NULL, _emergency_crash, _T("Fatal Application Failure"), MB_ICONERROR); + ExitProcess(3); + } + CrashLogWindows *log = new CrashLogWindows(ep); CrashLogWindows::current = log; log->FillCrashLog(log->crashlog, lastof(log->crashlog)); @@ -427,10 +436,6 @@ static const TCHAR _save_succeeded[] = _T("Be aware that critical parts of the internal game state may have become ") _T("corrupted. The saved game is not guaranteed to work."); -static const TCHAR _emergency_crash[] = - _T("A serious fault condition occured in the game. The game will shut down.\n") - _T("As you loaded an emergency savegame no crash information will be generated.\n"); - static const TCHAR * const _expand_texts[] = {_T("S&how report >>"), _T("&Hide report <<") }; static void SetWndSize(HWND wnd, int mode) -- cgit v1.2.3-54-g00ecf