don't crash on thread detach - now Diablo 2 videotest isn't crashing anymore

svn path=/trunk/; revision=31763
This commit is contained in:
Christoph von Wittich 2008-01-13 15:42:23 +00:00
parent 1449fc2b23
commit fab53367f4
2 changed files with 4 additions and 0 deletions

View file

@ -91,6 +91,7 @@ OPENGL32_ThreadDetach()
if (!HeapFree( GetProcessHeap(), 0, lpData ))
DBGPRINT( "Warning: HeapFree() on GLTHREADDATA failed (%d)",
GetLastError() );
lpData = NULL;
}
dispatchTable = NtCurrentTeb()->glTable;

View file

@ -978,6 +978,9 @@ rosglMakeCurrent( HDC hdc, HGLRC hglrc )
DBGTRACE( "Called!" );
if (OPENGL32_threaddata == NULL)
return FALSE;
/* flush current context */
if (OPENGL32_threaddata->glrc != NULL)
{