Massimo Del Fedele : opengl32: glGetString() should return NULL on NULL context.
Alexandre Julliard
julliard at winehq.org
Thu Oct 16 09:34:23 CDT 2008
Module: wine
Branch: stable
Commit: f5cbd282eb431353197ab2785cf2f58a607ae261
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f5cbd282eb431353197ab2785cf2f58a607ae261
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.
(cherry picked from commit d6a6b88f1904783157245cae0b3f5a8d3de1ec20)
---
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