mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 12:49:08 +02:00
* Deref old content of node in FPSList.put. Mantis #19854
git-svn-id: trunk@18063 -
This commit is contained in:
parent
59e51c0bc2
commit
079831b50e
@ -398,9 +398,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPSList.Put(Index: Integer; Item: Pointer);
|
procedure TFPSList.Put(Index: Integer; Item: Pointer);
|
||||||
|
var p : Pointer;
|
||||||
begin
|
begin
|
||||||
if (Index < 0) or (Index >= FCount) then
|
if (Index < 0) or (Index >= FCount) then
|
||||||
RaiseIndexError(Index);
|
RaiseIndexError(Index);
|
||||||
|
p:=InternalItems[Index];
|
||||||
|
if assigned(p) then
|
||||||
|
DeRef(p);
|
||||||
InternalItems[Index] := Item;
|
InternalItems[Index] := Item;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user