Fix double-free on failed load

This commit is contained in:
Vladimir Serbinenko 2020-02-12 00:47:34 +01:00
parent 0d729b7a5c
commit 2487001e31

View File

@ -659,8 +659,10 @@ failed:
if (environ_cb)
environ_cb(RETRO_ENVIRONMENT_SET_MESSAGE, (void*)&msg);
}
if (screen_buf)
if (screen_buf) {
free(screen_buf);
screen_buf = NULL;
}
I_SafeExit(-1);
return false;
}