浏览代码

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

MeFisto94 5 年之前
父节点
当前提交
b56a3fa122
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/animation/JmeAnimClip.java

+ 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 {