From 77d0740b368a31912951fe11e1dec1bdd7770a61 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Thu, 14 Nov 2013 22:20:48 +0000 Subject: [PATCH] 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 --- src/main.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2225ed450..b7ddba97c 100644 --- a/src/main.cpp +++ b/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