Debugger: Invalidate disassembler cache index after using it

Not before. Amends b3812bf94f.

Change-Id: I3f8dd9f23adbbd56bb0d5d76a80a90fd9b7030b5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-03-06 10:15:26 +01:00
parent 8e47fc18a6
commit a7c05e5e11

View File

@@ -238,8 +238,8 @@ void DisassemblerAgent::setLocation(const Location &loc)
// Refresh when not displaying a function and there is not sufficient
// context left past the address.
if (d->cache.at(index).first.endAddress - loc.address() < 24) {
index = -1;
d->cache.removeAt(index);
index = -1;
}
}
if (index != -1) {