Skip to content

Commit 13ede84

Browse files
committed
* WaitFor when TFileMonitor is disabled
If Enabled = false, the WaitFor in the destructor could not terminate
1 parent ed7868e commit 13ede84

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Quick.FileMonitor.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ constructor TFileMonitor.Create;
105105
destructor TFileMonitor.Destroy;
106106
begin
107107
if not Terminated then Terminate;
108-
Self.WaitFor;
108+
if fEnabled then
109+
Self.WaitFor;
109110
fTickEvent.SetEvent;
110111
fTickEvent.Free;
111112
inherited;

0 commit comments

Comments
 (0)