1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-29 13:20:35 +00:00

Merge branch 'fix_asan_warning' into 'master'

Fix ASAN warning

See merge request OpenMW/openmw!1159
This commit is contained in:
psi29a 2021-08-20 07:23:37 +00:00
commit f3b634807f

View File

@ -345,8 +345,12 @@ namespace DetourNavigator
while (true)
{
bool shouldStop = false;
const auto hasJob = [&] {
return (!mWaiting.empty() && mWaiting.front()->mProcessTime <= std::chrono::steady_clock::now())
shouldStop = mShouldStop;
return shouldStop
|| (!mWaiting.empty() && mWaiting.front()->mProcessTime <= std::chrono::steady_clock::now())
|| !threadQueue.empty();
};
@ -357,6 +361,9 @@ namespace DetourNavigator
return mJobs.end();
}
if (shouldStop)
return mJobs.end();
Log(Debug::Debug) << "Got " << mJobs.size() << " navigator jobs and "
<< threadQueue.size() << " thread jobs by thread=" << std::this_thread::get_id();