diff --git a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglCanvas.java b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglCanvas.java index 3621aa255..a4646b44f 100644 --- a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglCanvas.java +++ b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglCanvas.java @@ -65,7 +65,8 @@ public class JoglCanvas extends JoglAbstractDisplay implements JmeCanvasContext public void destroy(boolean waitFor){ if (waitFor) waitFor(false); - animator.stop(); + if (animator.isAnimating()) + animator.stop(); } @Override @@ -122,7 +123,7 @@ public class JoglCanvas extends JoglAbstractDisplay implements JmeCanvasContext animator.stop(); wasAnimating = false; } - + listener.update(); renderer.onFrame(); @@ -133,7 +134,7 @@ public class JoglCanvas extends JoglAbstractDisplay implements JmeCanvasContext } @Override - public void dispose(GLAutoDrawable arg0) { + public void dispose(GLAutoDrawable arg0) { } } diff --git a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtCanvas.java b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtCanvas.java index 46ec21ca1..cb84c94a9 100644 --- a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtCanvas.java +++ b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtCanvas.java @@ -85,7 +85,8 @@ public class JoglNewtCanvas extends JoglNewtAbstractDisplay implements JmeCanvas public void destroy(boolean waitFor){ if (waitFor) waitFor(false); - animator.stop(); + if (animator.isAnimating()) + animator.stop(); } @Override