Fix malloc/delete mismatch

This commit is contained in:
negativeExponent 2020-10-16 15:53:55 +08:00
parent 48664059b5
commit da956cc125

View File

@ -545,8 +545,19 @@ void retro_get_system_av_info(struct retro_system_av_info *info)
void retro_deinit()
{
delete surf;
if (surf)
{
if (surf->pixels16)
free(surf->pixels16);
surf->pixels16 = NULL;
if (surf->pixels)
free(surf->pixels);
surf->pixels = NULL;
free (surf);
surf = NULL;
}
libretro_supports_input_bitmasks = false;
}