mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 17:40:40 +02:00
IdeDebugger: Fix nil pointer access in "Fix Display-Format related conversion of numeric watches." 28ac5176a9
This commit is contained in:
parent
6ae79c8197
commit
43e385a90b
@ -882,6 +882,7 @@ var
|
||||
i: integer;
|
||||
d: TIdeWatchValue;
|
||||
t: TDBGType;
|
||||
s: String;
|
||||
begin
|
||||
if not nbInspect.Visible then exit;
|
||||
DebugBoss.LockCommandProcessing;
|
||||
@ -895,6 +896,12 @@ begin
|
||||
exit;
|
||||
InspectLabel.Caption := Watch.Expression;
|
||||
|
||||
if not(Watch.Enabled and Watch.HasAllValidParents(GetThreadId, GetStackframe)) then begin
|
||||
InspectMemo.WordWrap := True;
|
||||
InspectMemo.Text := '<evaluating>';
|
||||
exit;
|
||||
end;
|
||||
|
||||
d := Watch.Values[GetThreadId, GetStackframe];
|
||||
if d = nil then begin
|
||||
InspectMemo.WordWrap := True;
|
||||
@ -934,7 +941,11 @@ begin
|
||||
end;
|
||||
|
||||
InspectMemo.WordWrap := True;
|
||||
InspectMemo.Text := DebugBoss.FormatValue(d.TypeInfo, PrintWatchValue(d.ResultData, d.DisplayFormat));
|
||||
if d.ResultData <> nil then
|
||||
s := PrintWatchValue(d.ResultData, d.DisplayFormat)
|
||||
else
|
||||
s := d.Value;
|
||||
InspectMemo.Text := DebugBoss.FormatValue(d.TypeInfo, s);
|
||||
finally
|
||||
DebugBoss.UnLockCommandProcessing;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user