This crash may happen if parts of a global screen border graphic are
configured to be drawn (like "border.draw_masked.DOOR: true") while
the global screen border graphic itself is configured to be undefined
(like "global.border.MAIN: [NONE]"), which causes an attempt to blit
from a bitmap that is NULL, resulting in a segmentation fault.
This commit adds a check to prevent this.
Bitmap *src_bitmap = getGlobalBorderBitmapFromStatus(global.border_status);
Bitmap *dst_bitmap = gfx.masked_border_bitmap_ptr;
+ // may happen for "border.draw_masked.*" with undefined "global.border.*"
+ if (src_bitmap == NULL)
+ return;
+
if (x == -1 && y == -1)
return;