Fixed crash on linux (stdout was closed, but leak check would try
to print some output). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14434 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
e13e6feb4a
commit
77d0740b36
26
src/main.cpp
26
src/main.cpp
@ -1264,19 +1264,6 @@ static void cleanSuperTuxKart()
|
||||
if(music_manager) delete music_manager;
|
||||
delete ParticleKindManager::get();
|
||||
if(stk_config) delete stk_config;
|
||||
|
||||
#ifndef WIN32
|
||||
if (user_config) //close logfiles
|
||||
{
|
||||
Log::closeOutputFiles();
|
||||
#endif
|
||||
fclose(stderr);
|
||||
fclose(stdout);
|
||||
#ifndef WIN32
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if(user_config) delete user_config;
|
||||
if(unlock_manager) delete unlock_manager;
|
||||
if(translations) delete translations;
|
||||
@ -1575,6 +1562,19 @@ int main(int argc, char *argv[] )
|
||||
MemoryLeaks::checkForLeaks();
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
if (user_config) //close logfiles
|
||||
{
|
||||
Log::closeOutputFiles();
|
||||
#endif
|
||||
fclose(stderr);
|
||||
fclose(stdout);
|
||||
#ifndef WIN32
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
return 0 ;
|
||||
} // main
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user