MAINT-6460 Crash calculating mesh complexity

master
andreykproductengine 2016-07-14 15:21:39 +03:00
parent b06d5aeec8
commit 00a193e740
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}