diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 5107030476eaf49e94a19eb0c84d783b3465a4a8..d6039f6d7f752f534e2339f6c1e788aefb38e53b 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -502,7 +502,8 @@ bool LLAppViewerWin32::init() disableWinErrorReporting(); #ifndef LL_RELEASE_FOR_DOWNLOAD - LLWinDebug::instance().init(); + // Merely requesting the LLSingleton instance initializes it. + LLWinDebug::instance(); #endif #if LL_WINDOWS @@ -526,10 +527,6 @@ bool LLAppViewerWin32::cleanup() gDXHardware.cleanup(); -#ifndef LL_RELEASE_FOR_DOWNLOAD - LLWinDebug::instance().cleanup(); -#endif - if (mIsConsoleAllocated) { FreeConsole(); diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp index eff70ca0b2853bd3aab295aa6356cea3a0370aef..92c80ce53412f744d83ae4c66922eb01d528e7c2 100644 --- a/indra/newview/llwindebug.cpp +++ b/indra/newview/llwindebug.cpp @@ -90,7 +90,7 @@ LONG NTAPI vectoredHandler(PEXCEPTION_POINTERS exception_infop) } // static -void LLWinDebug::init() +void LLWinDebug::initSingleton() { static bool s_first_run = true; // Load the dbghelp dll now, instead of waiting for the crash. @@ -135,7 +135,7 @@ void LLWinDebug::init() } } -void LLWinDebug::cleanup () +void LLWinDebug::cleanupSingleton() { gEmergencyMemoryReserve.release(); } diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h index 90882cf04a099baf97a8afb396f73f5ac90c5f9a..5a0d63f0274c9fa6767c17491f885c410ef44b20 100644 --- a/indra/newview/llwindebug.h +++ b/indra/newview/llwindebug.h @@ -36,9 +36,9 @@ class LLWinDebug: { LLSINGLETON_EMPTY_CTOR(LLWinDebug); public: - static void init(); + static void initSingleton(); static void generateMinidump(struct _EXCEPTION_POINTERS *pExceptionInfo = NULL); - static void cleanup(); + static void cleanupSingleton(); private: static void writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename); };