winex11.drv: Don't deadlock if GL init fails.

This commit is contained in:
Juan Lang 2006-09-28 17:02:42 -07:00 committed by Alexandre Julliard
parent 32378f7c83
commit ec1ef77b26
1 changed files with 2 additions and 1 deletions

View File

@ -278,6 +278,7 @@ BOOL X11DRV_WineGL_InitOpenglInfo()
pglXMakeCurrent(gdi_display, win, ctx);
} else {
ERR(" couldn't initialize OpenGL, expect problems\n");
wine_tsx11_unlock();
return FALSE;
}
@ -302,12 +303,12 @@ BOOL X11DRV_WineGL_InitOpenglInfo()
TRACE("Client GLX version : %s.\n", WineGLInfo.glxClientVersion);
TRACE("Direct rendering enabled: %s\n", WineGLInfo.glxDirect ? "True" : "False");
wine_tsx11_unlock();
if(vis) XFree(vis);
if(ctx) {
pglXMakeCurrent(gdi_display, None, NULL);
pglXDestroyContext(gdi_display, ctx);
}
wine_tsx11_unlock();
return TRUE;
}