Changed order in which race gui and track are released to
avoid memory debugging having inconsistent texture information at startup and cleanup time. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8507 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
788d8b08e2
commit
86329d7ec5
@ -245,6 +245,10 @@ Controller* World::loadAIController(Kart *kart)
|
||||
//-----------------------------------------------------------------------------
|
||||
World::~World()
|
||||
{
|
||||
// In case that a race is aborted (e.g. track not found) m_track is 0.
|
||||
if(m_track)
|
||||
m_track->cleanup();
|
||||
|
||||
// Delete the in-race-gui:
|
||||
if(m_saved_race_gui)
|
||||
{
|
||||
@ -261,9 +265,6 @@ World::~World()
|
||||
delete m_race_gui;
|
||||
}
|
||||
delete race_state;
|
||||
// In case that a race is aborted (e.g. track not found) m_track is 0.
|
||||
if(m_track)
|
||||
m_track->cleanup();
|
||||
|
||||
for ( unsigned int i = 0 ; i < m_karts.size() ; i++ )
|
||||
delete m_karts[i];
|
||||
|
Loading…
Reference in New Issue
Block a user