summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
Diffstat (limited to 'src/os')
-rw-r--r--src/os/macosx/crashlog_osx.cpp8
-rw-r--r--src/os/unix/crashlog_unix.cpp8
-rw-r--r--src/os/windows/crashlog_win.cpp10
3 files changed, 26 insertions, 0 deletions
diff --git a/src/os/macosx/crashlog_osx.cpp b/src/os/macosx/crashlog_osx.cpp
index df17366af..77a363237 100644
--- a/src/os/macosx/crashlog_osx.cpp
+++ b/src/os/macosx/crashlog_osx.cpp
@@ -13,6 +13,7 @@
#include "../../crashlog.h"
#include "../../string_func.h"
#include "../../gamelog.h"
+#include "../../saveload/saveload.h"
#include "macos.h"
#include <errno.h>
@@ -230,6 +231,13 @@ void CDECL HandleCrash(int signum)
abort();
}
+ if (SaveloadCrashWithMissingNewGRFs()) {
+ ShowMacDialog("A serious fault condition occured in the game. The game will shut down.",
+ "As you loaded an savegame for which you do not have the required NewGRFs no crash information will be generated.\n",
+ "Quit");
+ abort();
+ }
+
CrashLogOSX log(signum);
log.MakeCrashLog();
log.DisplayCrashDialog();
diff --git a/src/os/unix/crashlog_unix.cpp b/src/os/unix/crashlog_unix.cpp
index c8314f5c8..72d023825 100644
--- a/src/os/unix/crashlog_unix.cpp
+++ b/src/os/unix/crashlog_unix.cpp
@@ -13,6 +13,7 @@
#include "../../crashlog.h"
#include "../../string_func.h"
#include "../../gamelog.h"
+#include "../../saveload/saveload.h"
#include <errno.h>
#include <signal.h>
@@ -156,6 +157,13 @@ static void CDECL HandleCrash(int signum)
abort();
}
+ if (SaveloadCrashWithMissingNewGRFs()) {
+ printf("A serious fault condition occured in the game. The game will shut down.\n");
+ printf("As you loaded an savegame for which you do not have the required NewGRFs\n");
+ printf("no crash information will be generated.\n");
+ abort();
+ }
+
CrashLogUnix log(signum);
log.MakeCrashLog();
diff --git a/src/os/windows/crashlog_win.cpp b/src/os/windows/crashlog_win.cpp
index 0d5b60040..30a4cf7db 100644
--- a/src/os/windows/crashlog_win.cpp
+++ b/src/os/windows/crashlog_win.cpp
@@ -18,6 +18,7 @@
#include "../../fileio_func.h"
#include "../../strings_func.h"
#include "../../gamelog.h"
+#include "../../saveload/saveload.h"
#include <windows.h>
#include <signal.h>
@@ -378,6 +379,15 @@ static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
ExitProcess(3);
}
+ if (SaveloadCrashWithMissingNewGRFs()) {
+ static const TCHAR _saveload_crash[] =
+ _T("A serious fault condition occured in the game. The game will shut down.\n")
+ _T("As you loaded an savegame for which you do not have the required NewGRFs\n")
+ _T("no crash information will be generated.\n");
+ MessageBox(NULL, _saveload_crash, _T("Fatal Application Failure"), MB_ICONERROR);
+ ExitProcess(3);
+ }
+
CrashLogWindows *log = new CrashLogWindows(ep);
CrashLogWindows::current = log;
log->FillCrashLog(log->crashlog, lastof(log->crashlog));