From c6edf400f39aca3fa8e75907bbeb4b8a488485ad Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 9 Apr 2017 23:50:57 +0200 Subject: [PATCH] fixed bug with trying to display exit message screen in headless mode --- src/init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/init.c b/src/init.c index adb7afdf..eeb8af52 100644 --- a/src/init.c +++ b/src/init.c @@ -5878,6 +5878,10 @@ void KeyboardAutoRepeatOffUnlessAutoplay() void DisplayExitMessage(char *format, va_list ap) { + // also check for initialized video (headless flag may be temporarily unset) + if (program.headless || !video.initialized) + return; + // check if draw buffer and fonts for exit message are already available if (drawto == NULL || font_initial[NUM_INITIAL_FONTS - 1].bitmap == NULL) return; -- 2.34.1