Moved m_animated_textures.clear(), m_all_nodes.clear(), & m_all_meshes.clear() *outside* of the respective for loops & removed the
redundant null pointer check for m_animated textures per Joerg's observations. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3810 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
0e80af99ab
commit
d46558fff4
@ -111,18 +111,20 @@ void Track::cleanup()
|
||||
for(unsigned int i=0; i<m_animated_textures.size(); i++)
|
||||
{
|
||||
delete m_animated_textures[i];
|
||||
m_animated_textures.clear();
|
||||
}
|
||||
m_animated_textures.clear();
|
||||
|
||||
for(unsigned int i=0; i<m_all_nodes.size(); i++)
|
||||
{
|
||||
irr_driver->removeNode(m_all_nodes[i]);
|
||||
m_all_nodes.clear();
|
||||
}
|
||||
m_all_nodes.clear();
|
||||
|
||||
for(unsigned int i=0; i<m_all_meshes.size(); i++)
|
||||
{
|
||||
irr_driver->removeMesh(m_all_meshes[i]);
|
||||
m_all_meshes.clear();
|
||||
}
|
||||
m_all_meshes.clear();
|
||||
|
||||
|
||||
delete m_non_collision_mesh;
|
||||
@ -512,7 +514,6 @@ void Track::update(float dt)
|
||||
{
|
||||
for(unsigned int i=0; i<m_animated_textures.size(); i++)
|
||||
{
|
||||
if (m_animated_textures[i] != NULL)
|
||||
m_animated_textures[i]->update(dt);
|
||||
}
|
||||
for(unsigned int i=0; i<m_physical_objects.size(); i++)
|
||||
|
Loading…
Reference in New Issue
Block a user