diff options
author | Sven Gothel <[email protected]> | 2013-04-23 08:03:20 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-04-23 08:03:20 +0200 |
commit | 5673f6525604d370e236fbc62f838af781096206 (patch) | |
tree | f6433d281ff11aef65ade06fcbc099ea7c5f41bd /src/jogl/classes/javax/media/opengl | |
parent | 8a66294628589d765c1c5d5b3cafe7b939179dc2 (diff) | |
parent | cdbf3f42ea530f91639536e03b2c203715c3c300 (diff) |
Merge remote-tracking branch 'hharrison/backend'
Diffstat (limited to 'src/jogl/classes/javax/media/opengl')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index 1da7001fd..a8c7f7eb2 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -510,7 +510,11 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing @Override public GLContext createContext(GLContext shareWith) { - return (null != backend) ? backend.createContext(shareWith) : null; + Backend b = backend; + if (b == null) + return null; + + return b.createContext(shareWith); } @Override @@ -633,10 +637,11 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing @Override public GLCapabilitiesImmutable getChosenGLCapabilities() { - if(null != backend) { - return backend.getChosenGLCapabilities(); - } - return null; + Backend b = backend; + if (b == null) + return null; + + return b.getChosenGLCapabilities(); } @Override @@ -833,8 +838,9 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing @Override public void run() { - if( null != backend ) { - listener = helper.disposeGLEventListener(GLJPanel.this, backend.getDrawable(), backend.getContext(), listener, remove); + Backend b = backend; + if (null != b) { + listener = helper.disposeGLEventListener(GLJPanel.this, b.getDrawable(), b.getContext(), listener, remove); } } }; |