Sanity checks in a part of video.c, per Ryuzaki's suggestion.

This commit is contained in:
OBattler
2020-03-24 02:52:35 +01:00
parent 1550a3a176
commit a28fb072c0

View File

@@ -776,9 +776,11 @@ set_palette(PALETTE p)
void
destroy_bitmap(bitmap_t *b)
{
if (b->dat != NULL)
if ((b != NULL) && (b->dat != NULL))
free(b->dat);
free(b);
if (b != NULL)
free(b);
}