Explorar el Código

* Deref old content of node in FPSList.put. Mantis #19854

git-svn-id: trunk@18063 -
marco hace 14 años
padre
commit
079831b50e
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      rtl/objpas/fgl.pp

+ 4 - 0
rtl/objpas/fgl.pp

@@ -398,9 +398,13 @@ begin
 end;
 
 procedure TFPSList.Put(Index: Integer; Item: Pointer);
+var p : Pointer;
 begin
   if (Index < 0) or (Index >= FCount) then
     RaiseIndexError(Index);
+  p:=InternalItems[Index];
+  if assigned(p) then
+    DeRef(p);	
   InternalItems[Index] := Item;
 end;