From d6a6b88f1904783157245cae0b3f5a8d3de1ec20 Mon Sep 17 00:00:00 2001 From: Massimo Del Fedele Date: Wed, 2 Jul 2008 16:51:26 +0200 Subject: [PATCH] opengl32: glGetString() should return NULL on NULL context. --- dlls/opengl32/wgl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index 6fbdeb4bdd1..a07fcf3bc67 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -632,6 +632,11 @@ const GLubyte * WINAPI wine_glGetString( GLenum name ) const GLubyte *ret; const char* GL_Extensions = NULL; + /* this is for buggy nvidia driver, crashing if called from a different + thread with no context */ + if(wglGetCurrentContext() == NULL) + return NULL; + if (GL_EXTENSIONS != name) { ENTER_GL(); ret = glGetString(name); -- 2.11.4.GIT