Mesh: avoid NPE in getMorphTargets() when there are no targets (#1231)
This commit is contained in:
parent
98f6d326e1
commit
8d9d091576
@ -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…
x
Reference in New Issue
Block a user