Skip to content

Commit

Permalink
Fixes a crash when quitting out of a game
Browse files Browse the repository at this point in the history
  • Loading branch information
proskd committed Aug 14, 2024
1 parent 7376c32 commit c80fcf5
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions libfreedo/arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,14 +600,37 @@ unsigned char * _arm_Init()

void _arm_Destroy()
{
io_interface(EXT_WRITE_NVRAM,pNVRam);//_3do_SaveNVRAM(pNVRam);
io_interface(EXT_WRITE_NVRAM,pNVRam);//_3do_SaveNVRAM(pNVRam);

if (profiling != NULL) {
delete []profiling;
delete []profiling2;
delete []profiling3;
delete []pNVRam;
delete []pRom;
delete []pRam;
profiling = NULL;
}

if (profiling2 != NULL) {
delete []profiling2;
profiling2 = NULL;
}

if (profiling3 != NULL) {
delete []profiling3;
profiling3 = NULL;
}

if (pNVRam != NULL) {
delete []pNVRam;
pNVRam = NULL;
}

if (pRom != NULL) {
delete []pRom;
pRom = NULL;
}

if (pRam != NULL) {
delete []pRam;
pRam = NULL;
}
}

void _arm_Reset()
Expand Down

0 comments on commit c80fcf5

Please sign in to comment.