DBG: Prevent a crash, when the selected snapshot is deleted. Can also happen when starting the debugger, while a snapshot from previous run is active

git-svn-id: trunk@37945 -
This commit is contained in:
martin 2012-07-14 22:11:16 +00:00
parent 557a7f055c
commit 74f97a8872

View File

@ -554,6 +554,8 @@ var
begin
DebugLn(DBG_DATA_MONITORS, ['DebugDataWindow: TWatchesDlg.SnapshotChanged ', DbgSName(Sender), ' Upd:', IsUpdating]);
lvWatches.BeginUpdate;
// prevent lvWatchesSelectItem when deleting the itews. Snapsot may have been deleted
FUpdatingAll := True; // will be reset by UpdateAll
try
NewWatches := Watches;
if FWatchesInView <> NewWatches
@ -561,6 +563,7 @@ begin
FWatchesInView := NewWatches;
UpdateAll;
finally
FUpdatingAll := False; // wan reset by UpdateAll anyway
lvWatches.EndUpdate;
end;
end;