opengl32: glGetString() should return NULL on NULL context.

This commit is contained in:
Massimo Del Fedele 2008-07-02 16:51:26 +02:00 committed by Alexandre Julliard
parent 0f9484a124
commit d6a6b88f19
1 changed files with 5 additions and 0 deletions

View File

@ -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);