summaryrefslogtreecommitdiff
path: root/src/os/windows
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-11-04 23:47:00 +0000
committermichi_cc <michi_cc@openttd.org>2011-11-04 23:47:00 +0000
commit6a2735d24ed54158b93eac217e803dcd89f67a9e (patch)
tree944963598eb052eeb378dae91d78f4dabca83848 /src/os/windows
parent65d0d19b1616e5867afdf9d9f1c68972d2c3f2b0 (diff)
downloadopenttd-6a2735d24ed54158b93eac217e803dcd89f67a9e.tar.xz
(svn r23119) -Fix: [Win32] Don't show a crash/assertion message box for a GUI-less video driver.
Diffstat (limited to 'src/os/windows')
-rw-r--r--src/os/windows/crashlog_win.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os/windows/crashlog_win.cpp b/src/os/windows/crashlog_win.cpp
index a02ca3c2d..2230203bf 100644
--- a/src/os/windows/crashlog_win.cpp
+++ b/src/os/windows/crashlog_win.cpp
@@ -25,6 +25,7 @@
#include "../../strings_func.h"
#include "../../gamelog.h"
#include "../../saveload/saveload.h"
+#include "../../video/video_driver.hpp"
#include <windows.h>
#include <signal.h>
@@ -526,7 +527,7 @@ static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
/* Close any possible log files */
CloseConsoleLogIfActive();
- if (_safe_esp != NULL) {
+ if ((_video_driver == NULL || _video_driver->HasGUI()) && _safe_esp != NULL) {
#ifdef _M_AMD64
ep->ContextRecord->Rip = (DWORD64)ShowCrashlogWindow;
ep->ContextRecord->Rsp = (DWORD64)_safe_esp;