Breakpoints: Fix crash after clearing all memory breakpoints

This commit is contained in:
container1234 2020-03-14 21:57:09 +09:00
parent 15acce847d
commit 75a69b1145
2 changed files with 10 additions and 1 deletions

View File

@ -196,6 +196,15 @@ void MemChecks::Remove(u32 address)
});
}
void MemChecks::Clear()
{
Core::RunAsCPUThread([&] {
m_mem_checks.clear();
JitInterface::ClearCache();
PowerPC::DBATUpdated();
});
}
TMemCheck* MemChecks::GetMemCheck(u32 address, size_t size)
{
const auto iter =

View File

@ -88,7 +88,7 @@ public:
bool OverlapsMemcheck(u32 address, u32 length) const;
void Remove(u32 address);
void Clear() { m_mem_checks.clear(); }
void Clear();
bool HasAny() const { return !m_mem_checks.empty(); }
private: