fixed crash bug when running in headless mode
authorHolger Schemel <info@artsoft.org>
Thu, 19 Jan 2023 08:08:22 +0000 (09:08 +0100)
committerHolger Schemel <info@artsoft.org>
Thu, 19 Jan 2023 08:08:22 +0000 (09:08 +0100)
src/libgame/sdl.c

index baa53340c4502380357bc45e8540f1efe11eb782..9f97f5366870ce1d5e63cdc9b43c6b101b4dd100 100644 (file)
@@ -69,6 +69,9 @@ static void FinalizeScreen(int draw_target)
 
 static void UpdateScreenExt(SDL_Rect *rect, boolean with_frame_delay)
 {
+  if (program.headless)
+    return;
+
   static DelayCounter update_screen_delay = { 50 };    // (milliseconds)
   SDL_Surface *screen = backbuffer->surface;