opengl32: glGetString() requires an active GL context

Bruno Jesus 00cpxxx at gmail.com
Sat Jun 21 13:36:46 CDT 2014


The fix from bug 13599 was removed between 1.5.9 and 1.5.10:

http://source.winehq.org/source/dlls/opengl32/wgl.c?v=wine-1.5.9#L1270
http://source.winehq.org/source/dlls/opengl32/wgl.c?v=wine-1.5.10#L1547

See http://bugs.winehq.org/show_bug.cgi?id=36506#c6 for more info.

Fixes bug http://bugs.winehq.org/show_bug.cgi?id=36506
-------------- next part --------------
diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 9255e34..f5adefd 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -1706,7 +1706,7 @@ static GLubyte *filter_extensions( const char *extensions )
 const GLubyte * WINAPI glGetString( GLenum name )
 {
     const struct opengl_funcs *funcs = NtCurrentTeb()->glTable;
-    const GLubyte *ret = funcs->gl.p_glGetString( name );
+    const GLubyte *ret = funcs ? funcs->gl.p_glGetString( name ) : NULL;
 
     if (name == GL_EXTENSIONS && ret)
     {


More information about the wine-patches mailing list