瀏覽代碼

* Use an own put for tfpginterfacedobjectlist as per bug #39846.
Maybe not the most elegant, but solves the immediately

marcoonthegit 3 年之前
父節點
當前提交
f532cf1698
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      rtl/objpas/fgl.pp

+ 2 - 1
rtl/objpas/fgl.pp

@@ -1228,7 +1228,8 @@ end;
 
 procedure TFPGInterfacedObjectList.Put(Index: Integer; const Item: T);
 begin
-  inherited Put(Index, @Item);
+  CheckIndex(Index);
+  InternalItems[Index] := @Item; // eventually calls copyitem()
 end;
 
 function TFPGInterfacedObjectList.Add(const Item: T): Integer;