From dc972a3faaea29389dd09bc49e87881016df5d00 Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Tue, 23 Jan 2018 09:27:16 +0100 Subject: [PATCH] Fixed gui_message attempting to show an error would segfault if the screen was not initialized --- src/osdep/amiberry_gui.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/osdep/amiberry_gui.cpp b/src/osdep/amiberry_gui.cpp index 28979eaf..19c68a83 100644 --- a/src/osdep/amiberry_gui.cpp +++ b/src/osdep/amiberry_gui.cpp @@ -624,6 +624,12 @@ void gui_message(const char* format, ...) vsprintf(msg, format, parms); va_end(parms); + if (!uae_gui) + { + // GUI screen is not initialized, output message to the console instead + printf("%s\n", msg); + return; + } InGameMessage(msg); }