Module: wine Branch: master Commit: d6a6b88f1904783157245cae0b3f5a8d3de1ec20 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d6a6b88f1904783157245cae0b...
Author: Massimo Del Fedele max@veneto.com Date: Wed Jul 2 16:51:26 2008 +0200
opengl32: glGetString() should return NULL on NULL context.
---
dlls/opengl32/wgl.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index 6fbdeb4..a07fcf3 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);