mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 10:09:22 +02:00
* Fix issue 39431
This commit is contained in:
parent
2052049e74
commit
5df6671ff2
@ -1104,8 +1104,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TFPGObjectList.GetFirst: T;
|
function TFPGObjectList.GetFirst: T;
|
||||||
|
|
||||||
|
Var
|
||||||
|
P: Pointer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := T(inherited GetFirst^);
|
if FCount<>0 then
|
||||||
|
Result := T(inherited GetFirst^)
|
||||||
|
else
|
||||||
|
Result := Default(T)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPGObjectList.SetFirst(const Value: T);
|
procedure TFPGObjectList.SetFirst(const Value: T);
|
||||||
@ -1135,7 +1142,10 @@ end;
|
|||||||
|
|
||||||
function TFPGObjectList.GetLast: T;
|
function TFPGObjectList.GetLast: T;
|
||||||
begin
|
begin
|
||||||
Result := T(inherited GetLast^);
|
if FCount<>0 then
|
||||||
|
Result := T(inherited GetLast^)
|
||||||
|
else
|
||||||
|
Result :=Default(T);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPGObjectList.SetLast(const Value: T);
|
procedure TFPGObjectList.SetLast(const Value: T);
|
||||||
|
Loading…
Reference in New Issue
Block a user