mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-30 12:32:36 +00:00
Add a mutex lock around the SharedStateManager
This commit is contained in:
parent
c3ad4dad75
commit
49ecac4ced
@ -357,7 +357,9 @@ namespace Resource
|
|||||||
loaded->accept(setFilterSettingsControllerVisitor);
|
loaded->accept(setFilterSettingsControllerVisitor);
|
||||||
|
|
||||||
// share state
|
// share state
|
||||||
|
mSharedStateMutex.lock();
|
||||||
osgDB::Registry::instance()->getOrCreateSharedStateManager()->share(loaded.get());
|
osgDB::Registry::instance()->getOrCreateSharedStateManager()->share(loaded.get());
|
||||||
|
mSharedStateMutex.unlock();
|
||||||
|
|
||||||
if (mIncrementalCompileOperation)
|
if (mIncrementalCompileOperation)
|
||||||
mIncrementalCompileOperation->add(loaded);
|
mIncrementalCompileOperation->add(loaded);
|
||||||
|
@ -89,6 +89,8 @@ namespace Resource
|
|||||||
void setUnRefImageDataAfterApply(bool unref);
|
void setUnRefImageDataAfterApply(bool unref);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
OpenThreads::Mutex mSharedStateMutex;
|
||||||
|
|
||||||
Resource::ImageManager* mImageManager;
|
Resource::ImageManager* mImageManager;
|
||||||
Resource::NifFileManager* mNifFileManager;
|
Resource::NifFileManager* mNifFileManager;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user