Explorar el Código

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

marcoonthegit hace 3 años
padre
commit
f532cf1698
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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;