mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-14 05:06:44 +00:00
Merge branch 'fix_asan_warning' into 'master'
Fix ASAN warning See merge request OpenMW/openmw!1159
This commit is contained in:
commit
f3b634807f
1 changed files with 8 additions and 1 deletions
|
@ -345,8 +345,12 @@ namespace DetourNavigator
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
bool shouldStop = false;
|
||||||
|
|
||||||
const auto hasJob = [&] {
|
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();
|
|| !threadQueue.empty();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -357,6 +361,9 @@ namespace DetourNavigator
|
||||||
return mJobs.end();
|
return mJobs.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (shouldStop)
|
||||||
|
return mJobs.end();
|
||||||
|
|
||||||
Log(Debug::Debug) << "Got " << mJobs.size() << " navigator jobs and "
|
Log(Debug::Debug) << "Got " << mJobs.size() << " navigator jobs and "
|
||||||
<< threadQueue.size() << " thread jobs by thread=" << std::this_thread::get_id();
|
<< threadQueue.size() << " thread jobs by thread=" << std::this_thread::get_id();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue