summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/javax/media')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index 78310c654..3b24cc2af 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -471,10 +471,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
if (backend != null && backend.getContext() != null) {
- boolean animatorPaused = false;
+ final boolean animatorPaused;
final GLAnimatorControl animator = getAnimator();
if(null!=animator) {
animatorPaused = animator.pause();
+ } else {
+ animatorPaused = false;
}
if(backend.getContext().isCreated()) {
@@ -486,7 +488,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
isInitialized = false;
}
- if(animatorPaused) {
+ if( animatorPaused ) {
animator.resume();
}
}