mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-02 07:36:34 +00:00
Merge pull request #4137 from aldelaro5/memCheck-crash-fix
Fix a crash when adding the first memory check while the game is running
This commit is contained in:
commit
7311cd8b6e
3 changed files with 18 additions and 3 deletions
|
@ -171,7 +171,7 @@ void MemChecks::Add(const TMemCheck& _rMemoryCheck)
|
|||
// If this is the first one, clear the JIT cache so it can switch to
|
||||
// watchpoint-compatible code.
|
||||
if (!had_any && jit)
|
||||
jit->ClearCache();
|
||||
jit->GetBlockCache()->SchedulateClearCacheThreadSafe();
|
||||
}
|
||||
|
||||
void MemChecks::Remove(u32 _Address)
|
||||
|
@ -181,11 +181,11 @@ void MemChecks::Remove(u32 _Address)
|
|||
if (i->StartAddress == _Address)
|
||||
{
|
||||
m_MemChecks.erase(i);
|
||||
if (!HasAny() && jit)
|
||||
jit->GetBlockCache()->SchedulateClearCacheThreadSafe();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!HasAny() && jit)
|
||||
jit->ClearCache();
|
||||
}
|
||||
|
||||
TMemCheck* MemChecks::GetMemCheck(u32 address)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue