Fixed NPE in setBoneAttachement in SkeletonControl.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7221 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
rem..om 2011-04-08 20:54:53 +00:00
parent f9c321e6e9
commit 77acf77428

View File

@ -175,7 +175,7 @@ public class SkeletonControl extends AbstractControl implements Savable, Cloneab
fnb.position(fnb.position() - bufLength);
fnb.put(normBuf, 0, bufLength);
}
assert vars.unlock();
vb.updateData(fvb);
@ -196,6 +196,7 @@ public class SkeletonControl extends AbstractControl implements Savable, Cloneab
Node clonedNode = (Node) spatial;
AnimControl ctrl = spatial.getControl(AnimControl.class);
SkeletonControl clone = new SkeletonControl();
clone.setSpatial(clonedNode);
clone.skeleton = ctrl.getSkeleton();
Mesh[] meshes = new Mesh[targets.length];