MAINT-8417 Don't run display or startup if window is not initialized

Fri, 23 Mar 2018 19:14:41 +0200

author
andreykproductengine <andreykproductengine@lindenlab.com>
date
Fri, 23 Mar 2018 19:14:41 +0200
changeset 55354
27143bdfa240
parent 55353
29c656ea46ab
child 55355
9123341e59d3

MAINT-8417 Don't run display or startup if window is not initialized

indra/newview/llappviewer.cpp file | annotate | diff | revisions
indra/newview/llstartup.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llappviewer.cpp	Thu Mar 22 12:21:38 2018 +0200
     1.2 +++ b/indra/newview/llappviewer.cpp	Fri Mar 23 19:14:41 2018 +0200
     1.3 @@ -959,10 +959,11 @@
     1.4  
     1.5  	if (!initCache())
     1.6  	{
     1.7 +		LL_WARNS("InitInfo") << "Failed to init cache" << LL_ENDL;
     1.8  		std::ostringstream msg;
     1.9  		msg << LLTrans::getString("MBUnableToAccessFile");
    1.10  		OSMessageBox(msg.str(),LLStringUtil::null,OSMB_OK);
    1.11 -		return 1;
    1.12 +		return 0;
    1.13  	}
    1.14  	LL_INFOS("InitInfo") << "Cache initialization is done." << LL_ENDL ;
    1.15  
    1.16 @@ -1431,7 +1432,7 @@
    1.17  
    1.18  			// Render scene.
    1.19  			// *TODO: Should we run display() even during gHeadlessClient?  DK 2011-02-18
    1.20 -			if (!LLApp::isExiting() && !gHeadlessClient)
    1.21 +			if (!LLApp::isExiting() && !gHeadlessClient && gViewerWindow)
    1.22  			{
    1.23  				pingMainloopTimeout("Main:Display");
    1.24  				gGLActive = TRUE;
     2.1 --- a/indra/newview/llstartup.cpp	Thu Mar 22 12:21:38 2018 +0200
     2.2 +++ b/indra/newview/llstartup.cpp	Fri Mar 23 19:14:41 2018 +0200
     2.3 @@ -313,6 +313,13 @@
     2.4  // true when all initialization done.
     2.5  bool idle_startup()
     2.6  {
     2.7 +	if (gViewerWindow == NULL)
     2.8 +	{
     2.9 +		// We expect window to be initialized
    2.10 +		LL_WARNS_ONCE() << "gViewerWindow is not initialized" << LL_ENDL;
    2.11 +		return false; // No world yet
    2.12 +	}
    2.13 +
    2.14  	const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay");
    2.15  	static LLTimer timeout;
    2.16  

mercurial