Sfoglia il codice sorgente

* WaitFor when TFileMonitor is disabled

If Enabled = false, the WaitFor in the destructor could not terminate
jkour 1 anno fa
parent
commit
13ede84dba
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      Quick.FileMonitor.pas

+ 2 - 1
Quick.FileMonitor.pas

@@ -105,7 +105,8 @@ end;
 destructor TFileMonitor.Destroy;
 begin
   if not Terminated then Terminate;
-  Self.WaitFor;
+  if fEnabled then
+    Self.WaitFor;
   fTickEvent.SetEvent;
   fTickEvent.Free;
   inherited;