Explorar o código

* Only free event if it was actually created

Michaël Van Canneyt hai 1 ano
pai
achega
cb7a8dfea7
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      packages/fcl-base/src/syncobjs.pp

+ 2 - 1
packages/fcl-base/src/syncobjs.pp

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