Fixed a segmentation fault when hard resetting on some Amstrads.

This commit is contained in:
OBattler
2020-12-18 22:58:57 +01:00
parent 3f45852af7
commit c881dc975f

View File

@@ -1715,8 +1715,13 @@ vid_close_200(void *priv)
{
amsvid_t *vid = (amsvid_t *)priv;
free(vid->cga.vram);
free(vid->mda.vram);
if (vid->cga.vram != vid->mda.vram) {
free(vid->cga.vram);
free(vid->mda.vram);
} else
free(vid->cga.vram);
vid->cga.vram = vid->mda.vram = NULL;
free(vid);
}