From 976dab16a307d16c277a50c6f9582781731a352d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 23 Mar 2018 19:14:41 +0200 Subject: MAINT-8417 Don't run display or startup if window is not initialized --- indra/newview/llappviewer.cpp | 5 +++-- indra/newview/llstartup.cpp | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b15ea7d79f..c33c0d5684 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -959,10 +959,11 @@ bool LLAppViewer::init() if (!initCache()) { + LL_WARNS("InitInfo") << "Failed to init cache" << LL_ENDL; std::ostringstream msg; msg << LLTrans::getString("MBUnableToAccessFile"); OSMessageBox(msg.str(),LLStringUtil::null,OSMB_OK); - return 1; + return 0; } LL_INFOS("InitInfo") << "Cache initialization is done." << LL_ENDL ; @@ -1431,7 +1432,7 @@ bool LLAppViewer::doFrame() // Render scene. // *TODO: Should we run display() even during gHeadlessClient? DK 2011-02-18 - if (!LLApp::isExiting() && !gHeadlessClient) + if (!LLApp::isExiting() && !gHeadlessClient && gViewerWindow) { pingMainloopTimeout("Main:Display"); gGLActive = TRUE; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 2e3f6a3199..2ed2f8644e 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -313,6 +313,13 @@ void set_flags_and_update_appearance() // true when all initialization done. bool idle_startup() { + if (gViewerWindow == NULL) + { + // We expect window to be initialized + LL_WARNS_ONCE() << "gViewerWindow is not initialized" << LL_ENDL; + return false; // No world yet + } + const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay"); static LLTimer timeout; -- cgit v1.2.3