diff options
author | Graham Madarasz <graham@lindenlab.com> | 2013-06-13 07:57:22 -0700 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2013-06-13 07:57:22 -0700 |
commit | ac018153cb21e4bf37ed8d8003fbf36e44883d09 (patch) | |
tree | 4149aa29e735bfef83b848ebf25ee431176d9f91 | |
parent | 8ad2c0b8fbd586a8a9c4f090180c45eef1810a65 (diff) |
MAINT-2632 speculative guards in display_startup based on prevalence of crashes ending there (no repro, unfortunately)
-rwxr-xr-x | indra/newview/llviewerdisplay.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 9117bf1c01..d0f24b26a9 100755 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -115,7 +115,8 @@ void render_disconnected_background(); void display_startup() { - if ( !gViewerWindow->getActive() + if ( !gViewerWindow + || !gViewerWindow->getActive() || !gViewerWindow->getWindow()->getVisible() || gViewerWindow->getWindow()->getMinimized() ) { @@ -126,7 +127,7 @@ void display_startup() // Update images? //gImageList.updateImages(0.01f); - LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName(); + LLTexUnit::sWhiteTexture = !LLViewerFetchedTexture::sWhiteImagep.isNull() ? LLViewerFetchedTexture::sWhiteImagep->getTexName() : NULL; LLGLSDefault gls_default; @@ -148,10 +149,12 @@ void display_startup() LLGLSUIDefault gls_ui; gPipeline.disableLights(); + if (gViewerWindow) gViewerWindow->setup2DRender(); gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); gGL.color4f(1,1,1,1); + if (gViewerWindow) gViewerWindow->draw(); gGL.flush(); @@ -160,7 +163,9 @@ void display_startup() LLGLState::checkStates(); LLGLState::checkTextureChannels(); + if (gViewerWindow && gViewerWindow->getWindow()) gViewerWindow->getWindow()->swapBuffers(); + glClear(GL_DEPTH_BUFFER_BIT); } |