1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-15 18:16:33 +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:
elsid 2025-08-17 12:44:13 +02:00
parent 9610be7c8a
commit d84c81a85d
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -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;
} }
} }