summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolterrain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolterrain.cpp')
-rwxr-xr-xindra/newview/lldrawpoolterrain.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index c3ec234223..d7ecacf2e6 100755
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -88,8 +88,11 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) :
//gGL.getTexUnit(0)->bind(m2DAlphaRampImagep.get());
m2DAlphaRampImagep->setAddressMode(LLTexUnit::TAM_CLAMP);
- mTexturep->setBoostLevel(LLGLTexture::BOOST_TERRAIN);
-
+ if (mTexturep)
+ {
+ mTexturep->setBoostLevel(LLGLTexture::BOOST_TERRAIN);
+ }
+
//gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
@@ -851,11 +854,18 @@ void LLDrawPoolTerrain::renderSimple()
// Pass 1/1
// Stage 0: Base terrain texture pass
- mTexturep->addTextureStats(1024.f*1024.f);
+ if (mTexturep)
+ {
+ mTexturep->addTextureStats(1024.f*1024.f);
+ }
gGL.getTexUnit(0)->activate();
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
- gGL.getTexUnit(0)->bind(mTexturep);
+
+ if (mTexturep)
+ {
+ gGL.getTexUnit(0)->bind(mTexturep);
+ }
LLVector3 origin_agent = mDrawFace[0]->getDrawable()->getVObj()->getRegion()->getOriginAgent();
F32 tscale = 1.f/256.f;