diff options
author | Billy Biggs <bbiggs> | 2005-09-29 18:04:48 +0000 |
---|---|---|
committer | Billy Biggs <bbiggs> | 2005-09-29 18:04:48 +0000 |
commit | 9a79fbd85cda981978050b58fe5d23529aaf1f11 (patch) | |
tree | b668d158c53d07d2ccc82ac342db133579ef537f /bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java | |
parent | fb6d2df828bbfcf96d146011227cfe339524c82e (diff) | |
download | eclipse.platform.swt-9a79fbd85cda981978050b58fe5d23529aaf1f11.tar.gz eclipse.platform.swt-9a79fbd85cda981978050b58fe5d23529aaf1f11.tar.xz eclipse.platform.swt-9a79fbd85cda981978050b58fe5d23529aaf1f11.zip |
Clean up properly when the pixel format is not supported.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java index 2ca9859afa..8b7b0c247d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java @@ -109,7 +109,10 @@ public GLCanvas (Composite parent, int style, GLData data) { int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle); int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window); int /*long*/ infoPtr = GLX.glXChooseVisual (xDisplay, OS.XDefaultScreen (xDisplay), glxAttrib); - if (infoPtr == 0) SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH); + if (infoPtr == 0) { + dispose (); + SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH); + } vinfo = new XVisualInfo (); GLX.memmove (vinfo, infoPtr, XVisualInfo.sizeof); OS.XFree (infoPtr); |