diff options
author | Geenz <geenz@geenzo.com> | 2013-01-02 16:16:07 -0500 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2013-01-02 16:16:07 -0500 |
commit | 966a4c893c816fc699580092bd6e93a0e514798c (patch) | |
tree | f3e3102a3d68f28dd814941160623ddcc6448b0c | |
parent | 2b0f50dd821848d18ab35095623c3bdbcdeb910c (diff) |
OS X crash on startup fix: always ensure that mMainLoopInitialized is initialized properly within LLAppViewer::init(). Otherwise, the viewer will sporadically crash on start up.
-rw-r--r-- | indra/newview/llappviewer.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6a87f7306d..131f4c4031 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -676,6 +676,11 @@ bool LLAppViewer::init() // we run the "program crashed last time" error handler below. // LLFastTimer::reset(); + + +#ifdef LL_DARWIN + mMainLoopInitialized = false; +#endif // initialize SSE options LLVector4a::initClass(); @@ -1196,7 +1201,9 @@ LLMemType mt1(LLMemType::MTYPE_MAIN); bool LLAppViewer::mainLoop() { +#ifdef LL_DARWIN if (!mMainLoopInitialized) +#endif { mMainloopTimeout = new LLWatchdogTimeout(); @@ -1218,13 +1225,16 @@ bool LLAppViewer::mainLoop() joystick = LLViewerJoystick::getInstance(); joystick->setNeedsReset(true); - - // As we do not (yet) send data on the mainloop LLEventPump that varies - // with each frame, no need to instantiate a new LLSD event object each - // time. Obviously, if that changes, just instantiate the LLSD at the - // point of posting. +#ifdef LL_DARWIN + // Ensure that this section of code never gets called again on OS X. mMainLoopInitialized = true; +#endif } + // As we do not (yet) send data on the mainloop LLEventPump that varies + // with each frame, no need to instantiate a new LLSD event object each + // time. Obviously, if that changes, just instantiate the LLSD at the + // point of posting. + LLEventPump& mainloop(LLEventPumps::instance().obtain("mainloop")); LLSD newFrame; |