diff options
author | Sven Gothel <[email protected]> | 2020-01-06 04:49:15 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-01-06 04:49:15 +0100 |
commit | 69db39c035455fc0154006304e7340d825415e99 (patch) | |
tree | c746abc3fbebbca9510f4cafee6543477659bdbd /src/jogl/classes | |
parent | 8caf3fab68dc890855961d22cb235d1c8f5c52c6 (diff) |
SWT GLCanvas: Fix NPE in DEBUG mode; NewtCanvasSWT: Resurect comment in setBounds(..)
Diffstat (limited to 'src/jogl/classes')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java index 6ca53b3f2..257c71ee7 100644 --- a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java +++ b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java @@ -543,7 +543,9 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS res = false; } if(DEBUG) { - System.err.println(getThreadName()+": SWT.GLCanvas.validate.X "+toHexString(hashCode())+": "+res+", drawable-realized "+drawable.isRealized()+", has context "+(null!=context)); + final boolean isDrawableNull = null == drawable; + final boolean isDrawableRealized = !isDrawableNull ? drawable.isRealized() : false; + System.err.println(getThreadName()+": SWT.GLCanvas.validate.X "+toHexString(hashCode())+": "+res+", drawable[null "+isDrawableNull+", realized "+isDrawableRealized+"], has context "+(null!=context)); } } finally { _lock.unlock(); |