Uninitialize g_Disk and g_DDRom to prevent exception when ending emulation of a regular ROM after playing 64DD content previously.
This commit is contained in:
parent
40841f0d71
commit
f300fd9cb5
|
@ -370,6 +370,17 @@ bool CN64System::LoadFileImage(const char * FileLoc)
|
||||||
|
|
||||||
bool CN64System::RunFileImage(const char * FileLoc)
|
bool CN64System::RunFileImage(const char * FileLoc)
|
||||||
{
|
{
|
||||||
|
//Uninitialize g_Disk and g_DDRom to prevent exception when ending emulation of a regular ROM after playing 64DD content previously.
|
||||||
|
if (g_Disk != NULL)
|
||||||
|
{
|
||||||
|
delete g_Disk;
|
||||||
|
g_Disk = NULL;
|
||||||
|
}
|
||||||
|
if (g_DDRom != NULL)
|
||||||
|
{
|
||||||
|
delete g_DDRom;
|
||||||
|
g_DDRom = NULL;
|
||||||
|
}
|
||||||
if (!LoadFileImage(FileLoc))
|
if (!LoadFileImage(FileLoc))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue