LazUtils: allow ReleaseRef on nil

git-svn-id: trunk@43395 -
This commit is contained in:
martin 2013-11-08 01:33:45 +00:00
parent 4c8b79e5fc
commit 4928979536

View File

@ -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;