mirror of
https://github.com/reactos/reactos.git
synced 2024-07-22 20:28:08 +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 )
|
||||
{
|
||||
GLTHREADDATA* lpData = NULL;
|
||||
PROC *dispatchTable = NULL;
|
||||
TEB* teb = NtCurrentTeb();
|
||||
|
||||
rosglMakeCurrent( NULL, NULL );
|
||||
|
||||
|
@ -85,12 +85,15 @@ OPENGL32_ThreadDetach( void )
|
|||
lpData = NULL;
|
||||
}
|
||||
|
||||
dispatchTable = NtCurrentTeb()->glTable;
|
||||
if (dispatchTable != NULL)
|
||||
if (teb->glTable != NULL)
|
||||
{
|
||||
if (!HeapFree( GetProcessHeap(), 0, dispatchTable ))
|
||||
if (!HeapFree( GetProcessHeap(), 0, teb->glTable ))
|
||||
{
|
||||
DBGPRINT( "Warning: HeapFree() on dispatch table failed (%d)",
|
||||
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