Add a mutex lock around the SharedStateManager

pull/893/head
scrawl 9 years ago
parent c3ad4dad75
commit 49ecac4ced

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

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

Loading…
Cancel
Save