summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-07-14 15:21:39 +0300
committerandreykproductengine <akleshchev@productengine.com>2016-07-14 15:21:39 +0300
commit00a193e740536bc8dbdc7a4c52ae8d75efba0037 (patch)
treee4cf7b4c7c615c049094bbea8797bb253ac71109
parentb06d5aeec8144f18e039758d3c70e9414f83ce21 (diff)
MAINT-6460 Crash calculating mesh complexity
-rw-r--r--indra/newview/llmeshrepository.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index bf7f91d19a..a0e57677c3 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -4033,7 +4033,9 @@ void LLMeshRepository::uploadError(LLSD& args)
//static
F32 LLMeshRepository::getStreamingCost(LLSD& header, F32 radius, S32* bytes, S32* bytes_visible, S32 lod, F32 *unscaled_value)
{
- if (header.size() == 0 || header.has("404") || header["version"].asInteger() > MAX_MESH_VERSION)
+ if (header.has("404")
+ || !header.has("lowest_lod")
+ || (header.has("version") && header["version"].asInteger() > MAX_MESH_VERSION))
{
return 0.f;
}