From 9b4968e2eaba0f187569ab4dd617a203350ecf87 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 23 Feb 2025 17:42:42 +0100 Subject: [PATCH] added warning for potential GIC config problems that should not happen --- src/libgame/image.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libgame/image.c b/src/libgame/image.c index ad9dfde8..ab17468e 100644 --- a/src/libgame/image.c +++ b/src/libgame/image.c @@ -416,6 +416,10 @@ void ResetColorTemplateImage(int pos) // image color template not yet defined -- copy from original bitmap Bitmap *orig_bitmap = img_info->bitmaps[IMG_BITMAP_PTR_ORIGINAL]; + // this may happen due to configuration problems in "graphicsinfo.conf" (to be checked) + if (orig_bitmap == NULL) + Fail("undefined bitmap for file '%s' -- should not happen", img_info->source_filename); + img_info->template = ZoomBitmap(orig_bitmap, orig_bitmap->width, orig_bitmap->height); } -- 2.34.1