crash fix for win32 closerom

This commit is contained in:
nitsuja 2009-09-06 16:41:18 +00:00
parent 9828dc1ce7
commit 87a167983e
1 changed files with 2 additions and 0 deletions

View File

@ -949,6 +949,8 @@ int NDS_LoadROM(const char *filename, const char *logicalFilename)
#endif
void NDS_FreeROM(void)
{
if ((u8*)MMU.CART_ROM == (u8*)gameInfo.romdata)
gameInfo.romdata = NULL;
if (MMU.CART_ROM != MMU.UNUSED_RAM)
delete [] MMU.CART_ROM;
MMU_unsetRom();