Browse Source

* Fixed SetItem as per bugreport of Paul Ishenin

git-svn-id: trunk@11732 -
michael 17 years ago
parent
commit
89b8e2e9e7
1 changed files with 1 additions and 8 deletions
  1. 1 8
      packages/fcl-base/src/contnrs.pp

+ 1 - 8
packages/fcl-base/src/contnrs.pp

@@ -807,15 +807,8 @@ end;
 
 Procedure TObjectList.SetItem(Index: Integer; AObject: TObject);
 
-Var
-  O : TObject;
-
 begin
-  if OwnsObjects then
-    begin
-    O:=GetItem(Index);
-    O.Free;
-    end;
+  // Put will take care of deleting old one in Notify.
   Put(Index,Pointer(AObject));
 end;