projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[OPENGL32]
[reactos.git]
/
reactos
/
dll
/
win32
/
opengl32
/
opengl32.c
diff --git
a/reactos/dll/win32/opengl32/opengl32.c
b/reactos/dll/win32/opengl32/opengl32.c
index
cf46007
..
1d5330a
100644
(file)
--- a/
reactos/dll/win32/opengl32/opengl32.c
+++ b/
reactos/dll/win32/opengl32/opengl32.c
@@
-72,7
+72,7
@@
static void
OPENGL32_ThreadDetach( void )
{
GLTHREADDATA* lpData = NULL;
OPENGL32_ThreadDetach( void )
{
GLTHREADDATA* lpData = NULL;
-
PROC *dispatchTable = NULL
;
+
TEB* teb = NtCurrentTeb()
;
rosglMakeCurrent( NULL, NULL );
rosglMakeCurrent( NULL, NULL );
@@
-85,12
+85,15
@@
OPENGL32_ThreadDetach( void )
lpData = NULL;
}
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() );
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;
}
}
}
}