Massimo Del Fedele : opengl32: glGetString() should return NULL on NULL context.
Alexandre Julliard
julliard at winehq.org
Fri Jul 4 13:59:10 CDT 2008
Module: wine
Branch: master
Commit: d6a6b88f1904783157245cae0b3f5a8d3de1ec20
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d6a6b88f1904783157245cae0b3f5a8d3de1ec20
Author: Massimo Del Fedele <max at 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);
More information about the wine-cvs
mailing list