Due to a bug (that will be fixed with the following commit) it may
be possible that game elements are drawn for undefined graphics ID,
resulting in a crash.
A check was added to prevent drawing sprites for undefined graphics.
if (NoDisplayFlag)
return;
if (NoDisplayFlag)
return;
+ if (graphic < 0)
+ return;
+
getGraphicSource_SP(&g, graphic, sync_frame, -1, -1);
Blt(pX, pY, g.bitmap, g.src_x, g.src_y);
getGraphicSource_SP(&g, graphic, sync_frame, -1, -1);
Blt(pX, pY, g.bitmap, g.src_x, g.src_y);