summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java b/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java
index 305899fff..cc15f0cd6 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java
@@ -217,8 +217,18 @@ public class EGLUpstreamSurfaceHook implements UpstreamSurfaceHook.MutableSize {
@Override
public String toString() {
- final String us_s = null != upstreamSurface ? ( upstreamSurface.getClass().getName() + ": 0x" + Long.toHexString(upstreamSurface.getSurfaceHandle()) ) : "nil";
- return "EGLUpstreamSurfaceHook[ "+ upstreamSurface.getSurfaceWidth() + "x" + upstreamSurface.getSurfaceHeight() + ", " + us_s+ "]";
+ final String us_s;
+ final int sw, sh;
+ if( null != upstreamSurface ) {
+ us_s = upstreamSurface.getClass().getName() + ": 0x" + Long.toHexString(upstreamSurface.getSurfaceHandle());
+ sw = upstreamSurface.getSurfaceWidth();
+ sh = upstreamSurface.getSurfaceHeight();
+ } else {
+ us_s = "nil";
+ sw = -1;
+ sh = -1;
+ }
+ return "EGLUpstreamSurfaceHook[ "+ sw + "x" + sh + ", " + us_s+ "]";
}
}