Fixed another NPE when missing serialized waypoints and fixed having different names for write/read
This commit is contained in:
parent
23fe0658a6
commit
8477fa781b
@ -458,7 +458,7 @@ public class Spline implements Savable {
|
|||||||
public void read(JmeImporter im) throws IOException {
|
public void read(JmeImporter im) throws IOException {
|
||||||
InputCapsule in = im.getCapsule(this);
|
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);
|
float list[] = in.readFloatArray("segmentsLength", null);
|
||||||
if (list != null) {
|
if (list != null) {
|
||||||
segmentsLength = new ArrayList<Float>();
|
segmentsLength = new ArrayList<Float>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user