From c79968463d2d3bfe6dd351a90948dc69834b539f Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Mon, 10 Oct 2011 15:04:18 +0000 Subject: [PATCH] - fix Animation loading by using arraycopy.. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8375 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/animation/Animation.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/src/core/com/jme3/animation/Animation.java b/engine/src/core/com/jme3/animation/Animation.java index ab41d3804..f59e6178d 100644 --- a/engine/src/core/com/jme3/animation/Animation.java +++ b/engine/src/core/com/jme3/animation/Animation.java @@ -199,6 +199,8 @@ public class Animation implements Savable, Cloneable { InputCapsule in = im.getCapsule(this); name = in.readString("name", null); length = in.readFloat("length", 0f); - tracks = (Track[]) in.readSavableArray("tracks", null); + Object[] arr = in.readSavableArray("tracks", null); + tracks = new Track[arr.length]; + System.arraycopy(arr, 0, tracks, 0, arr.length); } }