Pārlūkot izejas kodu

* Only free event if it was actually created

Michaël Van Canneyt 1 gadu atpakaļ
vecāks
revīzija
cb7a8dfea7
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  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;