mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 14:38:01 +02:00
IdeDebugger: fix crash in watches window. Issue #41530 / Disable "Format watch" if no watch selected.
(cherry picked from commit 3d0e837d14
)
This commit is contained in:
parent
4186441ba3
commit
fd2daa7db3
@ -590,6 +590,8 @@ begin
|
||||
actPower.Enabled := True;
|
||||
|
||||
actToggleInspectSite.Enabled := True;
|
||||
popupWatchFormatPresets.Enabled := HasTopWatchSelected or
|
||||
( (Watch<>nil) and (Watch = Watch.TopParentWatch));
|
||||
|
||||
UpdateInspectPane;
|
||||
end;
|
||||
@ -1095,7 +1097,7 @@ begin
|
||||
end
|
||||
else begin
|
||||
Watch := TIdeWatch(GetSelected);
|
||||
if (Watch.TopParentWatch = Watch) then begin
|
||||
if (Watch <> nil) and (Watch.TopParentWatch = Watch) then begin
|
||||
d := APreset.DisplayFormat;
|
||||
d.CopyInheritedFrom(Watch.DisplayFormat);
|
||||
Watch.DisplayFormat := d;
|
||||
@ -1316,7 +1318,7 @@ begin
|
||||
end
|
||||
else begin
|
||||
Watch := TCurrentWatch(GetSelected);
|
||||
if (Watch.TopParentWatch = Watch) then begin
|
||||
if (Watch <> nil) and (Watch.TopParentWatch = Watch) then begin
|
||||
d := Watch.Values[GetThreadId, GetStackframe];
|
||||
dk := rdkUnknown;
|
||||
if (d <> nil) and (d.Validity = ddsValid) and (d.ResultData <> nil) then
|
||||
|
Loading…
Reference in New Issue
Block a user