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

This commit is contained in:
Stephen Gold 2019-12-09 07:39:30 -08:00 committed by Paul Speed
parent 8905b3d8f8
commit f9d2e03362

View File

@ -1527,8 +1527,12 @@ public class Mesh implements Savable, Cloneable, JmeCloneable {
} }
public MorphTarget[] getMorphTargets() { public MorphTarget[] getMorphTargets() {
if (morphTargets == null) {
return new MorphTarget[0];
} else {
return morphTargets.getArray(); return morphTargets.getArray();
} }
}
/** /**
* Get the name of all morphs in order. * Get the name of all morphs in order.