mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 05:59:28 +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;
|
||||
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user