From 5f77ff021bb3eb17af4ac400ad0661f96bd3ba6d Mon Sep 17 00:00:00 2001 From: Julien Gouesse Date: Tue, 22 Sep 2015 23:50:28 +0200 Subject: [PATCH] Fixes the NullPointerException in the demos when using JoglNewtDisplay --- .../src/main/java/com/jme3/system/jogl/JoglNewtDisplay.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtDisplay.java b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtDisplay.java index 84a99e8d2..56eab406a 100644 --- a/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtDisplay.java +++ b/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglNewtDisplay.java @@ -173,6 +173,8 @@ public class JoglNewtDisplay extends JoglNewtAbstractDisplay { if (waitFor){ waitFor(false); } + if (animator.isAnimating()) + animator.stop(); } public void restart() {