mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 11:46:50 +00:00
don't crash on thread detach - now Diablo 2 videotest isn't crashing anymore
svn path=/trunk/; revision=31763
This commit is contained in:
parent
1449fc2b23
commit
fab53367f4
2 changed files with 4 additions and 0 deletions
|
@ -91,6 +91,7 @@ OPENGL32_ThreadDetach()
|
|||
if (!HeapFree( GetProcessHeap(), 0, lpData ))
|
||||
DBGPRINT( "Warning: HeapFree() on GLTHREADDATA failed (%d)",
|
||||
GetLastError() );
|
||||
lpData = NULL;
|
||||
}
|
||||
|
||||
dispatchTable = NtCurrentTeb()->glTable;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue