summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-05-09 12:18:04 -0600
committerXiaohong Bao <bao@lindenlab.com>2011-05-09 12:18:04 -0600
commit847b709c27ea0c902b345f9a8d68c255c077c541 (patch)
tree5ccc4d8a6a0084a25844d2b0ecf4661b109e58e6 /indra/newview
parent39bf9be14271fc63370faef3767588425b7fbe0c (diff)
fix for SH-1530: Viewer crash in LLSurface::getWaterHeight
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewercamera.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index 23b0845f31..7f7366dd3d 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -756,6 +756,10 @@ LLVector3 LLViewerCamera::roundToPixel(const LLVector3 &pos_agent)
BOOL LLViewerCamera::cameraUnderWater() const
{
+ if(!gAgent.getRegion())
+ {
+ return FALSE ;
+ }
return getOrigin().mV[VZ] < gAgent.getRegion()->getWaterHeight();
}