1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00

Fix order of operations w.r.t clearing cache

This commit is contained in:
scrawl 2017-03-06 20:45:46 +01:00
parent 2c68ed4fb4
commit 16b5cadd9e

View File

@ -27,16 +27,16 @@ World::World(osg::Group* parent, Resource::ResourceSystem* resourceSystem, osgUt
mParent->addChild(mTerrainRoot);
mTextureManager.reset(new TextureManager(mResourceSystem->getSceneManager()));
mResourceSystem->addResourceManager(mTextureManager.get());
mChunkManager.reset(new ChunkManager(mStorage, mResourceSystem->getSceneManager(), mTextureManager.get()));
mResourceSystem->addResourceManager(mChunkManager.get());
mResourceSystem->addResourceManager(mTextureManager.get());
}
World::~World()
{
mResourceSystem->removeResourceManager(mTextureManager.get());
mResourceSystem->removeResourceManager(mChunkManager.get());
mResourceSystem->removeResourceManager(mTextureManager.get());
mParent->removeChild(mTerrainRoot);