Bugfix: fixed a bug that caused NPE to be raised when armature modifier

was on the mesh that had no vertex groups.
This commit is contained in:
jmekaelthas 2014-10-26 11:11:38 +01:00
parent 9efa32a250
commit de2d7eebf7

View File

@ -406,7 +406,7 @@ public class TemporalMesh extends Geometry {
tempNormals[i] = normals.get(vertIndex);
tempVertColors[i] = vertexColors != null ? vertexColors.get(face.getIndexes().indexOf(vertIndex)) : null;
if (boneIndexes.size() > 0) {
if (boneIndexes.size() > 0 && vertexGroups.size() > 0) {
Map<Float, Integer> boneBuffersForVertex = new HashMap<Float, Integer>();
Map<String, Float> vertexGroupsForVertex = vertexGroups.get(vertIndex);
for (Entry<String, Integer> entry : boneIndexes.entrySet()) {