|
@@ -646,10 +646,13 @@ void Parser::ParseLV2MaterialBlock(ASE::Material &mat) {
|
|
}
|
|
}
|
|
|
|
|
|
// get a reference to the material
|
|
// 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);
|
|
|
|
+ }
|
|
|
|
|
|
- // parse the material block
|
|
|
|
- ParseLV2MaterialBlock(sMat);
|
|
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|