From cb27a680bf155b1843180ae54a510b81b205c798 Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Wed, 9 Nov 2011 00:09:19 +0000 Subject: [PATCH] Fix profiler shutdown order This was SVN commit r10483. --- source/main.cpp | 3 +++ source/ps/GameSetup/GameSetup.cpp | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/main.cpp b/source/main.cpp index ad1c9448fd..b55a6d1d7e 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -503,5 +503,8 @@ int main(int argc, char* argv[]) RunGameOrAtlas(argc, const_cast(argv)); + // Shut down profiler initialised by EarlyInit + g_Profiler2.Shutdown(); + return EXIT_SUCCESS; } diff --git a/source/ps/GameSetup/GameSetup.cpp b/source/ps/GameSetup/GameSetup.cpp index bb491391ae..25e6098e70 100644 --- a/source/ps/GameSetup/GameSetup.cpp +++ b/source/ps/GameSetup/GameSetup.cpp @@ -698,8 +698,6 @@ void Shutdown(int UNUSED(flags)) wmi_Shutdown(); TIMER_END(L"shutdown wmi"); #endif - - g_Profiler2.Shutdown(); } #if OS_UNIX @@ -779,7 +777,8 @@ void EarlyInit() timer_LatchStartTime(); - // initialise profiler early so it can profile startup + // initialise profiler early so it can profile startup, + // but only after LatchStartTime g_Profiler2.Initialise(); FixLocales();