Before, the program crashed (segmentation fault) if optional graphics
(like "menu.button_level_number", which are defined to be off-screen
by default) are defined to a valid screen position (by setting the
corresponding screen position values like "main.button.level_number.x/y"
to positions on the screen), but no image was defined to be used for
that graphic.
This bug was fixed by using fallback graphics when attempting to draw
those undefined optional graphics.
{
struct GraphicInfo *g = &graphic_info[graphic];
+ // if no graphics defined at all, use fallback graphics
+ if (g->bitmaps == NULL)
+ *g = graphic_info[IMG_CHAR_EXCLAM];
+
// if no in-game graphics defined, always use standard graphic size
if (g->bitmaps[IMG_BITMAP_GAME] == NULL)
tilesize = TILESIZE;