Fixed another NPE when missing serialized waypoints and fixed having different names for write/read

cleanup_build_scripts
MeFisto94 9 years ago
parent 23fe0658a6
commit 8477fa781b
  1. 2
      jme3-core/src/main/java/com/jme3/math/Spline.java

@ -458,7 +458,7 @@ public class Spline implements Savable {
public void read(JmeImporter im) throws IOException {
InputCapsule in = im.getCapsule(this);
controlPoints = (ArrayList<Vector3f>) in.readSavableArrayList("wayPoints", null);
controlPoints = (ArrayList<Vector3f>) in.readSavableArrayList("controlPoints", new ArrayList<Vector3f>()); /* Empty List as default, prevents null pointers */
float list[] = in.readFloatArray("segmentsLength", null);
if (list != null) {
segmentsLength = new ArrayList<Float>();

Loading…
Cancel
Save