summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolwater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolwater.cpp')
-rw-r--r--indra/newview/lldrawpoolwater.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 4a7760f15c..d7fc716c55 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -567,7 +567,15 @@ void LLDrawPoolWater::shade()
LLCubeMap* skyMap = gSky.mVOSkyp->getCubeMap();
gWaterProgram.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, GL_TEXTURE_CUBE_MAP_ARB);
- skyMap->bind();
+
+ if (skyMap)
+ {
+ skyMap->bind();
+ }
+ else
+ {
+ llwarns << "NULL gSky.mVOSkyp->getCubeMap(), not binding." << llendl;
+ }
//bind normal map
S32 bumpTex = gWaterProgram.enableTexture(LLShaderMgr::BUMP_MAP);