summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-01-30 22:28:07 +0100
committerglx22 <glx22@users.noreply.github.com>2019-01-30 22:45:09 +0100
commitba38a7ca652c00a1d0851f4d97f0b7d360df853c (patch)
treec4f596b53d5c3fcc29cde8e2888152550e755573
parent530bdf33cc44d2d53c41eec19684959fd17107fa (diff)
downloadopenttd-ba38a7ca652c00a1d0851f4d97f0b7d360df853c.tar.xz
Fix: don't show OS error box for non GUI video drivers
-rw-r--r--src/openttd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 65374f439..585bcd427 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -117,7 +117,9 @@ void CDECL error(const char *s, ...)
vseprintf(buf, lastof(buf), s, va);
va_end(va);
- ShowOSErrorBox(buf, true);
+ if (VideoDriver::GetInstance() == NULL || VideoDriver::GetInstance()->HasGUI()) {
+ ShowOSErrorBox(buf, true);
+ }
/* Set the error message for the crash log and then invoke it. */
CrashLog::SetErrorMessage(buf);