Author: cwittich
Date: Sun Jan 13 18:42:23 2008
New Revision: 31763
URL:
http://svn.reactos.org/svn/reactos?rev=31763&view=rev
Log:
don't crash on thread detach - now Diablo 2 videotest isn't crashing anymore
Modified:
trunk/reactos/dll/win32/opengl32/opengl32.c
trunk/reactos/dll/win32/opengl32/wgl.c
Modified: trunk/reactos/dll/win32/opengl32/opengl32.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/opengl32/opengl3…
==============================================================================
--- trunk/reactos/dll/win32/opengl32/opengl32.c (original)
+++ trunk/reactos/dll/win32/opengl32/opengl32.c Sun Jan 13 18:42:23 2008
@@ -91,6 +91,7 @@
if (!HeapFree( GetProcessHeap(), 0, lpData ))
DBGPRINT( "Warning: HeapFree() on GLTHREADDATA failed (%d)",
GetLastError() );
+ lpData = NULL;
}
dispatchTable = NtCurrentTeb()->glTable;
Modified: trunk/reactos/dll/win32/opengl32/wgl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/opengl32/wgl.c?r…
==============================================================================
--- trunk/reactos/dll/win32/opengl32/wgl.c (original)
+++ trunk/reactos/dll/win32/opengl32/wgl.c Sun Jan 13 18:42:23 2008
@@ -978,6 +978,9 @@
DBGTRACE( "Called!" );
+ if (OPENGL32_threaddata == NULL)
+ return FALSE;
+
/* flush current context */
if (OPENGL32_threaddata->glrc != NULL)
{