mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 23:00:27 +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;
|
procedure TRefCountedObject.ReleaseReference;
|
||||||
begin
|
begin
|
||||||
|
if Self = nil then exit;
|
||||||
Assert(FRefCount > 0, 'TRefCountedObject.ReleaseReference RefCount > 0');
|
Assert(FRefCount > 0, 'TRefCountedObject.ReleaseReference RefCount > 0');
|
||||||
Dec(FRefCount);
|
Dec(FRefCount);
|
||||||
if FRefCount = 0 then DoFree;
|
if FRefCount = 0 then DoFree;
|
||||||
|
Loading…
Reference in New Issue
Block a user