1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-03 19:45:34 +00:00

Fix terrain material leak, this should in theory allow the terrain to free its temporary resources

This commit is contained in:
scrawl 2013-04-29 10:20:38 +02:00
parent 78596cad83
commit 9648804af5

View file

@ -54,9 +54,10 @@ namespace MWRender
TerrainMaterial::Profile::~Profile() TerrainMaterial::Profile::~Profile()
{ {
if (mMaterial)
sh::Factory::getInstance().destroyMaterialInstance(mMaterial->getName());
} }
Ogre::MaterialPtr TerrainMaterial::Profile::generate(const Ogre::Terrain* terrain) Ogre::MaterialPtr TerrainMaterial::Profile::generate(const Ogre::Terrain* terrain)
{ {
const Ogre::String& matName = terrain->getMaterialName(); const Ogre::String& matName = terrain->getMaterialName();