fixed crash with "autotest" due to clearing undefined bitmap rectangle
authorHolger Schemel <info@artsoft.org>
Sat, 16 Apr 2022 13:58:30 +0000 (15:58 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 16 Apr 2022 13:59:29 +0000 (15:59 +0200)
src/libgame/system.c

index 196e15dc72d8777dacefdff7d390f4825a071687..c41fbef27494cd40806fbd4b8567f53d801da07b 100644 (file)
@@ -906,6 +906,9 @@ void FadeRectangle(int x, int y, int width, int height,
 void FillRectangle(Bitmap *bitmap, int x, int y, int width, int height,
                   Pixel color)
 {
+  if (program.headless)
+    return;
+
   if (DrawingDeactivated(x, y, width, height))
     return;