Przeglądaj źródła

* Only free event if it was actually created

Michaël Van Canneyt 1 rok temu
rodzic
commit
cb7a8dfea7
1 zmienionych plików z 2 dodań i 1 usunięć
  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;