From a863de3d5f7a903a1ec68d245861ce0fdf577323 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 23 Feb 2024 01:01:39 +0100 Subject: [PATCH] fixed crash bug with masked blitting in headless mode --- src/libgame/system.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libgame/system.c b/src/libgame/system.c index f824ac51..e83df10b 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -938,6 +938,12 @@ void BlitBitmapMasked(Bitmap *src_bitmap, Bitmap *dst_bitmap, int src_x, int src_y, int width, int height, int dst_x, int dst_y) { + if (program.headless) + return; + + if (src_bitmap == NULL || dst_bitmap == NULL) + return; + if (DrawingDeactivated(dst_x, dst_y)) return; -- 2.34.1