Fix crash on logout running out of memory when generating the shutdown snapshot.

meow-7.2.2
Tonya Souther 2013-07-30 23:07:49 -05:00
parent 9f816b4cf4
commit 4e058840af
1 changed files with 12 additions and 3 deletions

View File

@ -281,9 +281,13 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
return;
}
//<FS:TS> Don't fiddle with for_snapshot: causes crashes at shutdown
// if rendering the UI runs out of memory
gSnapshot = for_snapshot;
if (LLPipeline::sRenderDeferred)
{ //hack to make sky show up in deferred snapshots
for_snapshot = FALSE;
//for_snapshot = FALSE;
gSnapshot = FALSE;
}
if (LLPipeline::sRenderFrameTest)
@ -291,7 +295,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
send_agent_pause();
}
gSnapshot = for_snapshot;
//<FS:TS> See fix above
//gSnapshot = for_snapshot;
LLGLSDefault gls_default;
LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE, GL_LEQUAL);
@ -796,7 +801,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLGLState::checkTextureChannels();
LLGLState::checkClientArrays();
if (!for_snapshot)
//<FS:TS> Shutdown crash fix
//if (!for_snapshot)
if (!gSnapshot)
{
if (gFrameCount > 1)
{ //for some reason, ATI 4800 series will error out if you
@ -1116,6 +1123,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLPipeline::sUnderWaterRender = FALSE;
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderUI");
//<FS:TS> Shutdown crash fix: don't render the UI if not
// actually called for
if (!for_snapshot)
{
LLFastTimer t(FTM_RENDER_UI);