modified: dlls/winex11.drv/opengl.c Added error handling for pglXMakeCurrent() call.

Joshua Beck jxb091000 at utdallas.edu
Wed Mar 23 20:20:27 CDT 2011


---
 dlls/winex11.drv/opengl.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index a9cc178..e6d20bf 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -343,9 +343,12 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
         XMapWindow( gdi_display, win );
     else
         win = root;
-
-    pglXMakeCurrent(gdi_display, win, ctx);
-
+	
+    if(pglXMakeCurrent(gdi_display, win, ctx) == 0)
+    {
+        ERR( "Couldn't attach GLX context to X window.\n" );
+        goto done;
+    }	
     WineGLInfo.glVersion = (const char *) pglGetString(GL_VERSION);
     str = (const char *) pglGetString(GL_EXTENSIONS);
     WineGLInfo.glExtensions = HeapAlloc(GetProcessHeap(), 0, strlen(str)+1);
-- 
1.7.4.1


--------------030402040501080107080707--



More information about the wine-patches mailing list