* Only free event if it was actually created

This commit is contained in:
Michaël Van Canneyt 2023-11-14 10:01:36 +01:00
parent 3c1d50ab72
commit cb7a8dfea7

View File

@ -412,7 +412,8 @@ end;
destructor THandleObject.Destroy;
begin
BasicEventDestroy(Handle);
if (Handle<>Nil) then
BasicEventDestroy(Handle);
end;
constructor TEventObject.Create(EventAttributes : PSecurityAttributes;