Initialize stop variable.
authorFrederik Juul Christiani <frederik@vikingsoft.eu>
Tue, 13 Jun 2017 08:28:12 +0000 (10:28 +0200)
committerJocelyn Turcotte <jturcotte@woboq.com>
Mon, 19 Jun 2017 10:11:11 +0000 (12:11 +0200)
Avoid stopping the worker thread immediately if the stop variable happens to be true.

shell_integration/windows/OCUtil/RemotePathChecker.cpp

index cf8b72bbdd68b9188fef4b89189b909ea04413d6..16449ddc014fef043baadb294d09ac776b231021 100644 (file)
@@ -172,7 +172,8 @@ void RemotePathChecker::workerThreadLoop()
 
 
 RemotePathChecker::RemotePathChecker()
-    : _watchedDirectories(make_shared<const vector<wstring>>())
+    : _stop(false)
+    , _watchedDirectories(make_shared<const vector<wstring>>())
     , _connected(false)
     , _newQueries(CreateEvent(NULL, true, true, NULL))
     , _thread([this]{ this->workerThreadLoop(); })