Merge pull request #224 from bslenul/crash-bios-missing

Prevent crash if BIOS is missing
This commit is contained in:
LibretroAdmin 2023-05-18 02:40:04 +02:00 committed by GitHub
commit acdedd4bed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1139,7 +1139,10 @@ static int HuCLoadCD(const char *bios_path)
MDFNFILE *fp = file_open(bios_path);
if(!fp)
{
MDFN_DispMessage("Firmware not found: '%s'", bios_path);
return(0);
}
memset(ROMSpace, 0xFF, 262144);
@ -2419,12 +2422,13 @@ void retro_get_system_av_info(struct retro_system_av_info *info)
void retro_deinit(void)
{
if (surf)
{
if (surf->pixels)
free(surf->pixels);
surf->pixels = NULL;
if (surf)
free(surf);
}
surf = NULL;
if (log_cb)