1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00

cellpreloader: abort all tasks first before waiting

This commit is contained in:
scrawl 2017-03-06 18:15:53 +01:00
parent 5f76317807
commit b898315962

View File

@ -198,10 +198,11 @@ namespace MWWorld
CellPreloader::~CellPreloader()
{
for (PreloadMap::iterator it = mPreloadCells.begin(); it != mPreloadCells.end();++it)
{
it->second.mWorkItem->abort();
for (PreloadMap::iterator it = mPreloadCells.begin(); it != mPreloadCells.end();++it)
it->second.mWorkItem->waitTillDone();
}
mPreloadCells.clear();
}