Merge pull request #4354 from sepalani/bp_rmtmp_it

BreakPoints: ClearAllTemporary uses valid iterators
This commit is contained in:
shuffle2 2016-10-17 14:14:10 -07:00 committed by GitHub
commit 43169d897f
1 changed files with 9 additions and 4 deletions

View File

@ -115,13 +115,18 @@ void BreakPoints::Clear()
void BreakPoints::ClearAllTemporary()
{
for (const TBreakPoint& bp : m_BreakPoints)
auto bp = m_BreakPoints.begin();
while (bp != m_BreakPoints.end())
{
if (bp.bTemporary)
if (bp->bTemporary)
{
if (jit)
jit->GetBlockCache()->InvalidateICache(bp.iAddress, 4, true);
Remove(bp.iAddress);
jit->GetBlockCache()->InvalidateICache(bp->iAddress, 4, true);
bp = m_BreakPoints.erase(bp);
}
else
{
++bp;
}
}
}