summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-07-12 21:37:45 +0300
committerandreykproductengine <akleshchev@productengine.com>2016-07-12 21:37:45 +0300
commitb06d5aeec8144f18e039758d3c70e9414f83ce21 (patch)
treee88a24b4302e35d982f121669986e5b25a615bc1 /indra/newview/llvovolume.cpp
parent85c0bec92c74e13c08dc316d2d1c3b0941dff536 (diff)
MAINT-6460 Crash calculating mesh complexity
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 8f0b233f01..486f6fae61 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3627,8 +3627,9 @@ F32 LLVOVolume::getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscaled_v
F32 radius = getScale().length()*0.5f;
if (isMesh())
- {
- LLSD& header = gMeshRepo.getMeshHeader(getVolume()->getParams().getSculptID());
+ {
+ const LLSD* header_ptr = gMeshRepo.getMeshHeader(getVolume()->getParams().getSculptID());
+ LLSD header = header_ptr ? *header_ptr : LLSD();
return LLMeshRepository::getStreamingCost(header, radius, bytes, visible_bytes, mLOD, unscaled_value);
}