summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-xindra/newview/llviewerregion.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 03d5563c65..697433148b 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1303,12 +1303,15 @@ void LLViewerRegion::updateReflectionProbes(bool full_update)
mReflectionMaps[idx] = gPipeline.mReflectionMapManager.addProbe();
}
- LLVector3 probe_origin = LLVector3(x, y, llmax(water_height, mImpl->mLandp->resolveHeightRegion(x, y)));
- probe_origin.mV[2] += hover_height;
- probe_origin += origin;
+ if (mReflectionMaps[idx])
+ {
+ LLVector3 probe_origin = LLVector3(x, y, llmax(water_height, mImpl->mLandp->resolveHeightRegion(x, y)));
+ probe_origin.mV[2] += hover_height;
+ probe_origin += origin;
- mReflectionMaps[idx]->mOrigin.load3(probe_origin.mV);
- mReflectionMaps[idx]->mRadius = probe_radius;
+ mReflectionMaps[idx]->mOrigin.load3(probe_origin.mV);
+ mReflectionMaps[idx]->mRadius = probe_radius;
+ }
}
}
}