mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-15 13:26:36 +00:00
Check if reload cells aborted before cv wait
If mAbortReloadCells is set to true before the first mReloadCellsMutex lock the loop can become infinite. Unlikely to happen in practice but theoretically possible.
This commit is contained in:
parent
9610be7c8a
commit
d84c81a85d
1 changed files with 3 additions and 3 deletions
|
@ -1041,6 +1041,9 @@ void Launcher::DataFilesPage::reloadCells()
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
if (mAbortReloadCells)
|
||||||
|
return;
|
||||||
|
|
||||||
mStartReloadCells.wait(lock);
|
mStartReloadCells.wait(lock);
|
||||||
|
|
||||||
if (mAbortReloadCells)
|
if (mAbortReloadCells)
|
||||||
|
@ -1071,9 +1074,6 @@ void Launcher::DataFilesPage::reloadCells()
|
||||||
}
|
}
|
||||||
|
|
||||||
lock.lock();
|
lock.lock();
|
||||||
|
|
||||||
if (mAbortReloadCells)
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue