mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 21:55:56 +02:00
LazUtils: allow ReleaseRef on nil
git-svn-id: trunk@43395 -
This commit is contained in:
parent
4c8b79e5fc
commit
4928979536
@ -99,6 +99,7 @@ end;
|
||||
|
||||
procedure TRefCountedObject.ReleaseReference;
|
||||
begin
|
||||
if Self = nil then exit;
|
||||
Assert(FRefCount > 0, 'TRefCountedObject.ReleaseReference RefCount > 0');
|
||||
Dec(FRefCount);
|
||||
if FRefCount = 0 then DoFree;
|
||||
|
Loading…
Reference in New Issue
Block a user