From: Holger Schemel Date: Sun, 23 Feb 2025 16:42:42 +0000 (+0100) Subject: added warning for potential GIC config problems that should not happen X-Git-Tag: 4.4.0.5~13 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=9b4968e2eaba0f187569ab4dd617a203350ecf87;p=rocksndiamonds.git added warning for potential GIC config problems that should not happen --- 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); }