|
@@ -168,7 +168,13 @@ public class Animation implements Savable, Cloneable {
|
|
|
length = in.readFloat("length", 0f);
|
|
|
|
|
|
Savable[] arr = in.readSavableArray("tracks", null);
|
|
|
- tracks = new Track[arr.length];
|
|
|
- System.arraycopy(arr, 0, tracks, 0, arr.length);
|
|
|
+ if (arr != null) {
|
|
|
+ // NOTE: Backward compat only .. Some animations have no
|
|
|
+ // tracks set at all even though it makes no sense.
|
|
|
+ // Since there's a null check in setTime(),
|
|
|
+ // its only appropriate that the check is made here as well.
|
|
|
+ tracks = new Track[arr.length];
|
|
|
+ System.arraycopy(arr, 0, tracks, 0, arr.length);
|
|
|
+ }
|
|
|
}
|
|
|
}
|