summaryrefslogtreecommitdiff
path: root/gdk/win32/gdkdisplay-win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdk/win32/gdkdisplay-win32.c')
-rw-r--r--gdk/win32/gdkdisplay-win32.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index bad1076866..7952089f52 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -1182,6 +1182,7 @@ gdk_win32_display_init_gl (GdkDisplay *display,
{
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (display);
HDC init_gl_hdc = NULL;
+ GdkGLContext *context;
if (display_win32->dummy_context_wgl.hdc == NULL)
display_win32->dummy_context_wgl.hdc = GetDC (display_win32->hwnd);
@@ -1216,12 +1217,9 @@ gdk_win32_display_init_gl (GdkDisplay *display,
}
#endif
- if (gdk_win32_display_init_wgl (display, error))
- {
- return g_object_new (GDK_TYPE_WIN32_GL_CONTEXT_WGL,
- "display", display,
- NULL);
- }
+ context = gdk_win32_display_init_wgl (display, error);
+ if (context)
+ return context;
#ifdef HAVE_EGL
g_clear_error (error);