[RESEND]Make wine_glGetString() return NULL on null gl context - Solves Bug 13599
Massimo Del Fedele
max at veneto.com
Tue Jul 1 08:55:23 CDT 2008
Bug 13599 - Can't install AutoCAD 2005
Crash of wine_glGetString on null context if called from a secondary thread
Accordingly to Mr.Focht analysis, that one solves the glGetString()
problem when called from a secondary thread with no context.
From 6ec70816aa5aec48f4ff1a719c7887c121cf666e Mon Sep 17 00:00:00 2001
From: Massimo Del Fedele<max at veneto.com>
Date: Sun, 29 Jun 2008 16:42:57 +0200
Subject: Made wine_glGetString() return NULL on null gl context
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1.5.4.3"
This is a multi-part message in MIME format.
--------------1.5.4.3
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
dlls/opengl32/wgl.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
--------------1.5.4.3
Content-Type: text/x-patch;
name="6ec70816aa5aec48f4ff1a719c7887c121cf666e.diff"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment;
filename="6ec70816aa5aec48f4ff1a719c7887c121cf666e.diff"
diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 6fbdeb4..79d43f2 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -632,6 +632,12 @@ 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... we just check for a valid context, and
+ return NULL if none */
+ if(NtCurrentTeb()->glContext == NULL)
+ return NULL;
+
if (GL_EXTENSIONS != name) {
ENTER_GL();
ret = glGetString(name);
--------------1.5.4.3--
More information about the wine-patches
mailing list