From: Holger Schemel Date: Sun, 9 Apr 2017 21:50:57 +0000 (+0200) Subject: fixed bug with trying to display exit message screen in headless mode X-Git-Tag: 4.1.0.0~126 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=c6edf400f39aca3fa8e75907bbeb4b8a488485ad;p=rocksndiamonds.git fixed bug with trying to display exit message screen in headless mode --- 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;