* Fix issue 39431

This commit is contained in:
Michaël Van Canneyt 2021-11-11 19:36:05 +01:00
parent 2052049e74
commit 5df6671ff2

View File

@ -1104,8 +1104,15 @@ begin
end;
function TFPGObjectList.GetFirst: T;
Var
P: Pointer;
begin
Result := T(inherited GetFirst^);
if FCount<>0 then
Result := T(inherited GetFirst^)
else
Result := Default(T)
end;
procedure TFPGObjectList.SetFirst(const Value: T);
@ -1135,7 +1142,10 @@ end;
function TFPGObjectList.GetLast: T;
begin
Result := T(inherited GetLast^);
if FCount<>0 then
Result := T(inherited GetLast^)
else
Result :=Default(T);
end;
procedure TFPGObjectList.SetLast(const Value: T);