mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:52:54 +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 ))
|
if (!HeapFree( GetProcessHeap(), 0, lpData ))
|
||||||
DBGPRINT( "Warning: HeapFree() on GLTHREADDATA failed (%d)",
|
DBGPRINT( "Warning: HeapFree() on GLTHREADDATA failed (%d)",
|
||||||
GetLastError() );
|
GetLastError() );
|
||||||
|
lpData = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatchTable = NtCurrentTeb()->glTable;
|
dispatchTable = NtCurrentTeb()->glTable;
|
||||||
|
|
|
@ -978,6 +978,9 @@ rosglMakeCurrent( HDC hdc, HGLRC hglrc )
|
||||||
|
|
||||||
DBGTRACE( "Called!" );
|
DBGTRACE( "Called!" );
|
||||||
|
|
||||||
|
if (OPENGL32_threaddata == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* flush current context */
|
/* flush current context */
|
||||||
if (OPENGL32_threaddata->glrc != NULL)
|
if (OPENGL32_threaddata->glrc != NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue