diff options
author | Nicky <nicky.dasmijn@gmail.com> | 2022-02-28 22:04:05 +0100 |
---|---|---|
committer | Nicky <nicky.dasmijn@gmail.com> | 2022-02-28 22:04:05 +0100 |
commit | 43031968a653899f62755b6d7b7e28b7fedc24d9 (patch) | |
tree | c610012c5d4e568d94dea4208a80fe1be53ff2bf /indra/llprimitive/llmodel.cpp | |
parent | 07d7dcc0be9b793b1bcef63f526b441a58a9b764 (diff) | |
parent | 6ca09a94554ec01f5c94ec60fffd01d7e33f3546 (diff) |
Merge remote-tracking branch 'll/master'
Diffstat (limited to 'indra/llprimitive/llmodel.cpp')
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 702a1b5238..1b34068ece 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -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; |