Skip to content
Snippets Groups Projects
Commit 250212d6 authored by Andrey Kleshchev's avatar Andrey Kleshchev
Browse files

SL-15183 Crash at LLModel::matchMaterialOrder

parent 5cde118e
No related branches found
No related tags found
No related merge requests found
......@@ -1262,6 +1262,14 @@ bool LLModel::matchMaterialOrder(LLModel* ref, int& refFaceCnt, int& modelFaceCn
LL_INFOS("MESHSKININFO")<<"Material of model is not a subset of reference."<<LL_ENDL;
return false;
}
if (mMaterialList.size() > ref->mMaterialList.size())
{
LL_INFOS("MESHSKININFO") << "Material of model has more materials than a reference." << LL_ENDL;
// We passed isMaterialListSubset, so materials are a subset, but subset isn't supposed to be
// larger than original and if we keep going, reordering will cause a crash
return false;
}
std::map<std::string, U32> index_map;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment