added warning for potential GIC config problems that should not happen
authorHolger Schemel <info@artsoft.org>
Sun, 23 Feb 2025 16:42:42 +0000 (17:42 +0100)
committerHolger Schemel <info@artsoft.org>
Sun, 23 Feb 2025 16:42:43 +0000 (17:42 +0100)
src/libgame/image.c

index ad9dfde845a3bddd3adc87b49b347baf6551d2d8..ab17468e1086ea63bc1f3e33590f9bbf3362a92b 100644 (file)
@@ -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);
   }