diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-02-28 21:55:28 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-02-28 21:55:28 +0200 |
| commit | 201f83472c604e837b40c12f3750602e30d79d0b (patch) | |
| tree | b5e983c44eb9913c5778f0773ac986d6bf038e20 /indra/llprimitive/llmodel.cpp | |
| parent | 696795a368a8825fb083627e39f65dcc30266122 (diff) | |
| parent | 6ca09a94554ec01f5c94ec60fffd01d7e33f3546 (diff) | |
Merge branch 'master' into DRTVWR-543-maint
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 239b2aa878..b471a4e9ec 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; |
