Fixed memory leak.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8380 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-04-19 04:02:10 +00:00
parent b807a3e608
commit dd778cfc8c

View File

@ -902,10 +902,11 @@ ITexture* IrrDriver::applyMask(video::ITexture* texture, const std::string& mask
return NULL;
}
return m_scene_manager->getVideoDriver()->addTexture(texture->getName().getPath().c_str(), img, NULL);
ITexture *t = m_scene_manager->getVideoDriver()->addTexture(texture->getName().getPath().c_str(), img, NULL);
img->drop();
mask->drop();
}
return t;
} // applyMask
// ----------------------------------------------------------------------------
/** Sets the ambient light.