summaryrefslogtreecommitdiff
path: root/src/os/macosx
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2020-01-12 19:51:11 +0100
committerglx22 <glx22@users.noreply.github.com>2020-01-12 22:02:10 +0100
commitdbbd0f5ddc39b1624749575195f47a144361b1a5 (patch)
tree523578800a51bca20fea4128bf8fab4d2be6174a /src/os/macosx
parent87700bfe0e16f7403dbed5468525989b337cf7f6 (diff)
downloadopenttd-dbbd0f5ddc39b1624749575195f47a144361b1a5.tar.xz
Fix: [OSX] Don't show a crash/assertion message box for a GUI-less video driver.
Diffstat (limited to 'src/os/macosx')
-rw-r--r--src/os/macosx/crashlog_osx.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/os/macosx/crashlog_osx.cpp b/src/os/macosx/crashlog_osx.cpp
index effbc7354..17686d9e1 100644
--- a/src/os/macosx/crashlog_osx.cpp
+++ b/src/os/macosx/crashlog_osx.cpp
@@ -12,6 +12,7 @@
#include "../../string_func.h"
#include "../../gamelog.h"
#include "../../saveload/saveload.h"
+#include "../../video/video_driver.hpp"
#include "macos.h"
#include <errno.h>
@@ -240,7 +241,9 @@ void CDECL HandleCrash(int signum)
CrashLogOSX log(signum);
log.MakeCrashLog();
- log.DisplayCrashDialog();
+ if (VideoDriver::GetInstance() == nullptr || VideoDriver::GetInstance()->HasGUI()) {
+ log.DisplayCrashDialog();
+ }
CrashLog::AfterCrashLogCleanup();
abort();