mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 13:45:58 +00:00
[OPENGL32]
- Naive try to fix bug 5057 svn path=/trunk/; revision=50973
This commit is contained in:
parent
31ebce8a90
commit
43f10841e0
|
@ -72,7 +72,7 @@ static void
|
||||||
OPENGL32_ThreadDetach( void )
|
OPENGL32_ThreadDetach( void )
|
||||||
{
|
{
|
||||||
GLTHREADDATA* lpData = NULL;
|
GLTHREADDATA* lpData = NULL;
|
||||||
PROC *dispatchTable = NULL;
|
TEB* teb = NtCurrentTeb();
|
||||||
|
|
||||||
rosglMakeCurrent( NULL, NULL );
|
rosglMakeCurrent( NULL, NULL );
|
||||||
|
|
||||||
|
@ -85,13 +85,16 @@ OPENGL32_ThreadDetach( void )
|
||||||
lpData = NULL;
|
lpData = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatchTable = NtCurrentTeb()->glTable;
|
if (teb->glTable != NULL)
|
||||||
if (dispatchTable != NULL)
|
{
|
||||||
|
if (!HeapFree( GetProcessHeap(), 0, teb->glTable ))
|
||||||
{
|
{
|
||||||
if (!HeapFree( GetProcessHeap(), 0, dispatchTable ))
|
|
||||||
DBGPRINT( "Warning: HeapFree() on dispatch table failed (%d)",
|
DBGPRINT( "Warning: HeapFree() on dispatch table failed (%d)",
|
||||||
GetLastError() );
|
GetLastError() );
|
||||||
}
|
}
|
||||||
|
/* NULL-ify it. Even if something went wrong, it's not a good idea to keep it non NULL */
|
||||||
|
teb->glTable = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue