1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 11:23:51 +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();