Fix the thread termination errors every time the directory browser is used.

This commit is contained in:
dg@cowlark.com
2023-03-27 21:06:59 +00:00
parent 8fb4c90bed
commit 5cefce9922

View File

@@ -93,7 +93,7 @@ void FluxEngineApp::RunOnWorkerThread(std::function<void()> callback)
std::cerr << "Cannot start new worker task as one is already running\n";
_callback = callback;
if (GetThread())
if (GetThread() && GetThread()->IsRunning())
GetThread()->Wait();
emergencyStop = false;