Skip to content

Commit

Permalink
ddragon, null pointer check
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkc64 committed Nov 10, 2024
1 parent 1240f12 commit e51f9a8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/burn/drv/pre90s/d_ddragon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,8 @@ static INT32 MemIndex()

// sub(sprite) cpu could be one of 4 cpu-types
// for ease - we'll access all of them via the cpu registry in the cheat engine.
static cheat_core *cheat_ptr;
static cpu_core_config *cheat_subptr;
static cheat_core *cheat_ptr = NULL;
static cpu_core_config *cheat_subptr = NULL;

static void subInit()
{
Expand Down Expand Up @@ -559,7 +559,10 @@ static void subReset()

static void subExit()
{
cheat_subptr->exit();
if (cheat_subptr) cheat_subptr->exit();

cheat_ptr = NULL;
cheat_subptr = NULL;
}

static INT32 subScan(INT32 nAction)
Expand Down

0 comments on commit e51f9a8

Please sign in to comment.