mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 06:19:32 +02:00
Debugger: fix watch-result enumerator
This commit is contained in:
parent
0dfb936053
commit
a2578a496f
@ -3881,23 +3881,30 @@ end;
|
||||
function TGenericWatchResultDataStruct.TWatchResultDataStructEnumerator.MoveNext: Boolean;
|
||||
begin
|
||||
if FSubEnumerator <> nil then begin
|
||||
if FSubEnumerator.MoveNext then
|
||||
Result := FSubEnumerator.MoveNext;
|
||||
if Result then
|
||||
exit
|
||||
else
|
||||
FreeAndNil(FSubEnumerator);
|
||||
end;
|
||||
|
||||
inc(FIndex);
|
||||
Result := FIndex < FSource.FieldCount;
|
||||
repeat
|
||||
inc(FIndex);
|
||||
Result := FIndex < FSource.FieldCount;
|
||||
|
||||
if Result and (dffVariant in FSource.Fields[FIndex].FieldFlags) then begin
|
||||
FSubOwner := FSource.Fields[FIndex].Owner;
|
||||
FSubEnumerator := TGenericWatchResultDataStruct.TWatchResultDataStructVariantEnumerator.Create(
|
||||
FSource.Fields[FIndex].Field
|
||||
);
|
||||
if not FSubEnumerator.MoveNext then
|
||||
FreeAndNil(FSubEnumerator);
|
||||
end;
|
||||
if Result and (dffVariant in FSource.Fields[FIndex].FieldFlags) then begin
|
||||
FSubOwner := FSource.Fields[FIndex].Owner;
|
||||
FSubEnumerator := TGenericWatchResultDataStruct.TWatchResultDataStructVariantEnumerator.Create(
|
||||
FSource.Fields[FIndex].Field
|
||||
);
|
||||
if not FSubEnumerator.MoveNext then begin
|
||||
FreeAndNil(FSubEnumerator);
|
||||
Continue;
|
||||
end;
|
||||
end;
|
||||
|
||||
break;
|
||||
until True;
|
||||
end;
|
||||
|
||||
{ TGenericWatchResultDataStruct.TNestedFieldsWatchResultStorage }
|
||||
|
Loading…
Reference in New Issue
Block a user