diff options
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 13 |
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; + } } } } |