Browse Source

Fix NPE when pressing stop in the new AnimComposer (call the right method to stop playing)

MeFisto94 5 years ago
parent
commit
b56a3fa122

+ 1 - 1
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/animation/JmeAnimClip.java

@@ -210,7 +210,7 @@ public class JmeAnimClip extends AbstractSceneExplorerNode {
             try {
                 SceneApplication.getApplication().enqueue(() -> {
                     if (playing) { // Stop Playing
-                        control.setCurrentAction(null);
+                        control.removeCurrentAction(AnimComposer.DEFAULT_LAYER);
                         jmeControl.setAnimClip(null);
                         return null;
                     } else {