1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 18:32:36 +00:00

Add a mutex lock around the SharedStateManager

This commit is contained in:
scrawl 2016-02-07 07:37:35 -08:00
parent c3ad4dad75
commit 49ecac4ced
2 changed files with 4 additions and 0 deletions

View File

@ -357,7 +357,9 @@ namespace Resource
loaded->accept(setFilterSettingsControllerVisitor);
// share state
mSharedStateMutex.lock();
osgDB::Registry::instance()->getOrCreateSharedStateManager()->share(loaded.get());
mSharedStateMutex.unlock();
if (mIncrementalCompileOperation)
mIncrementalCompileOperation->add(loaded);

View File

@ -89,6 +89,8 @@ namespace Resource
void setUnRefImageDataAfterApply(bool unref);
private:
OpenThreads::Mutex mSharedStateMutex;
Resource::ImageManager* mImageManager;
Resource::NifFileManager* mNifFileManager;