Fixed incorrect delete (which can cause a crash if long skidmarks
are used that will utilise hardware buffer). The crash could actually happen in another race or when ending stk (since then hw buffers are deleted). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5677 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
db9bf099e5
commit
949f6380ba
@ -59,9 +59,12 @@ void SkidMarks::reset()
|
||||
for(unsigned int i=0; i<m_nodes.size(); i++)
|
||||
{
|
||||
irr_driver->removeNode(m_nodes[i]);
|
||||
irr_driver->removeMesh(m_meshes[i]);
|
||||
delete m_left[i];
|
||||
delete m_right[i];
|
||||
// No need to call irr_driver->removeMesh, since this only
|
||||
// removes the mesh from the mesh cache (if it exists in it),
|
||||
// and this ('manual') mesh was never added to the cash.
|
||||
m_meshes[i]->drop();
|
||||
m_left[i]->drop();
|
||||
m_right[i]->drop();
|
||||
}
|
||||
m_left.clear();
|
||||
m_right.clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user