Explorar o código

address issue #825: SpatialTrack.clone() sets the trackSpatial to null

Stephen Gold %!s(int64=7) %!d(string=hai) anos
pai
achega
f533e5003d

+ 4 - 2
jme3-core/src/main/java/com/jme3/animation/SpatialTrack.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -252,7 +252,9 @@ public class SpatialTrack implements Track, JmeCloneable {
 
     @Override
     public Track clone() {
-        return (Track) jmeClone();
+        SpatialTrack copy = (SpatialTrack) jmeClone();
+        copy.setTrackSpatial(trackSpatial);
+        return (Track) copy;
     }
 
     @Override