Browse Source

* Patch from Luiz Americo to clean up tlist (bug ID 23024)

git-svn-id: trunk@22585 -
michael 13 years ago
parent
commit
61fecf4562
1 changed files with 3 additions and 5 deletions
  1. 3 5
      rtl/objpas/classes/lists.inc

+ 3 - 5
rtl/objpas/classes/lists.inc

@@ -646,8 +646,7 @@ end;
 
 destructor TList.Destroy;
 begin
-  If (Flist<>Nil) then
-    Clear;
+  Clear;
   If Assigned(FObservers) then
     begin
     FPONotifyObservers(Self,ooFree,Nil);
@@ -726,9 +725,8 @@ end;
 procedure TList.Clear;
 
 begin
-  If Assigned(Flist) then
-    While (FList.Count>0) do
-      Delete(Count-1);
+  While (FList.Count>0) do
+    Delete(Count-1);
 end;
 
 procedure TList.Delete(Index: Integer);