Mesh: avoid NPE in getMorphTargets() when there are no targets (#1231)

v3.3
Stephen Gold 5 years ago committed by Paul Speed
parent 8905b3d8f8
commit f9d2e03362
  1. 6
      jme3-core/src/main/java/com/jme3/scene/Mesh.java

@ -1527,7 +1527,11 @@ public class Mesh implements Savable, Cloneable, JmeCloneable {
}
public MorphTarget[] getMorphTargets() {
return morphTargets.getArray();
if (morphTargets == null) {
return new MorphTarget[0];
} else {
return morphTargets.getArray();
}
}
/**

Loading…
Cancel
Save