diff --git a/code/AssetLib/ASE/ASEParser.cpp b/code/AssetLib/ASE/ASEParser.cpp index 14eb720f4..9e2d301e8 100644 --- a/code/AssetLib/ASE/ASEParser.cpp +++ b/code/AssetLib/ASE/ASEParser.cpp @@ -646,7 +646,9 @@ void Parser::ParseLV2MaterialBlock(ASE::Material &mat) { } // get a reference to the material - Material &sMat = mat.avSubMaterials[iIndex]; + if (iIndex < mat.avSubMaterials.size()) { + Material &sMat = mat.avSubMaterials[iIndex]; + } // parse the material block ParseLV2MaterialBlock(sMat);