Fixed minor memory leak.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11499 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
e2caea1c05
commit
d73421afbc
@ -116,9 +116,17 @@ void ItemManager::removeTextures()
|
||||
{
|
||||
for(unsigned int i=0; i<Item::ITEM_LAST-Item::ITEM_FIRST+1; i++)
|
||||
{
|
||||
if(m_item_mesh[i] ) m_item_mesh[i]->drop();
|
||||
if(m_item_mesh[i])
|
||||
{
|
||||
m_item_mesh[i]->drop();
|
||||
irr_driver->removeMeshFromCache(m_item_mesh[i]);
|
||||
}
|
||||
m_item_mesh[i] = NULL;
|
||||
if(m_item_lowres_mesh[i]) m_item_lowres_mesh[i]->drop();
|
||||
if(m_item_lowres_mesh[i])
|
||||
{
|
||||
m_item_lowres_mesh[i]->drop();
|
||||
irr_driver->removeMeshFromCache(m_item_lowres_mesh[i]);
|
||||
}
|
||||
m_item_lowres_mesh[i] = NULL;
|
||||
}
|
||||
} // removeTextures
|
||||
|
Loading…
Reference in New Issue
Block a user