From 847b709c27ea0c902b345f9a8d68c255c077c541 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Mon, 9 May 2011 12:18:04 -0600 Subject: fix for SH-1530: Viewer crash in LLSurface::getWaterHeight --- indra/newview/llviewercamera.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') 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(); } -- cgit v1.2.3