Skip to content
Snippets Groups Projects
Commit 847b709c authored by Xiaohong Bao's avatar Xiaohong Bao
Browse files

fix for SH-1530: Viewer crash in LLSurface::getWaterHeight

parent 39bf9be1
No related branches found
No related tags found
No related merge requests found
...@@ -756,6 +756,10 @@ LLVector3 LLViewerCamera::roundToPixel(const LLVector3 &pos_agent) ...@@ -756,6 +756,10 @@ LLVector3 LLViewerCamera::roundToPixel(const LLVector3 &pos_agent)
BOOL LLViewerCamera::cameraUnderWater() const BOOL LLViewerCamera::cameraUnderWater() const
{ {
if(!gAgent.getRegion())
{
return FALSE ;
}
return getOrigin().mV[VZ] < gAgent.getRegion()->getWaterHeight(); return getOrigin().mV[VZ] < gAgent.getRegion()->getWaterHeight();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment