summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNicky <none@none>2012-08-28 23:52:30 +0200
committerNicky <none@none>2012-08-28 23:52:30 +0200
commit33263bb5e7dad106ef82c62f789ae430bad63d60 (patch)
tree430cd07f8a4193236ec807a800eebf2646c00a68 /indra
parent48631db986f4f16ba6810c4f91844066407d430d (diff)
Don't crash if star_brightness misses in a WL-Param set. Instead warn to log and exit the fuction gracefully.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index caf15fe1cb..b5faff7968 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -192,14 +192,18 @@ void LLDrawPoolWLSky::renderStars(void) const
bool error;
LLColor4 star_alpha(LLColor4::black);
star_alpha.mV[3] = LLWLParamManager::getInstance()->mCurParams.getFloat("star_brightness", error) / 2.f;
- llassert_always(!error);
+
+ // If start_brightness is not set, exit
+ if( error )
+ {
+ llwarns << "star_brightness missing in mCurParams" << llendl;
+ return;
+ }
gGL.getTexUnit(0)->bind(gSky.mVOSkyp->getBloomTex());
gGL.pushMatrix();
gGL.rotatef(gFrameTimeSeconds*0.01f, 0.f, 0.f, 1.f);
- // gl_FragColor.rgb = gl_Color.rgb;
- // gl_FragColor.a = gl_Color.a * star_alpha.a;
if (LLGLSLShader::sNoFixedFunction)
{
gCustomAlphaProgram.bind();