mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-05 10:20:40 +02:00
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:
parent
557a7f055c
commit
74f97a8872
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user