Browse Source

--- Merging r33598 into '.':
U rtl/objpas/fgl.pp
--- Recording mergeinfo for merge of r33598 into '.':
U .

# revisions: 33598

git-svn-id: branches/fixes_3_0@33664 -

marco 9 years ago
parent
commit
7d6ce76c1d
1 changed files with 8 additions and 2 deletions
  1. 8 2
      rtl/objpas/fgl.pp

+ 8 - 2
rtl/objpas/fgl.pp

@@ -876,7 +876,10 @@ end;
 
 function TFPGList.GetFirst: T;
 begin
-  Result := T(inherited GetFirst^);
+  if FCount<>0 then
+    Result := T(inherited GetFirst^)
+  else
+    Result:=Default(T);
 end;
 
 procedure TFPGList.SetFirst(const Value: T);
@@ -906,7 +909,10 @@ end;
 
 function TFPGList.GetLast: T;
 begin
-  Result := T(inherited GetLast^);
+  if FCount<>0 then
+    Result := T(inherited GetLast^)
+  else
+    result:=Default(T);
 end;
 
 procedure TFPGList.SetLast(const Value: T);