mirror of
https://github.com/reactos/reactos.git
synced 2024-07-21 03:37:57 +00:00
Bugfix : Do not assume unini value ( OPENGL32_tls ) are set to -1 (0xFFFFFFFF), do not assume DWORD always will be 32bits convert all 0xFFFFFFFF value for OPENGL32_tls to -1
svn path=/trunk/; revision=30427
This commit is contained in:
parent
d23e936e77
commit
7ebbdf5274
|
@ -29,7 +29,8 @@ static DWORD OPENGL32_RegGetDriverInfo( LPCWSTR driver, GLDRIVERDATA *icd );
|
|||
|
||||
|
||||
/* global vars */
|
||||
DWORD OPENGL32_tls;
|
||||
/* Do not assume it have the free value -1 set, any value can be in here */
|
||||
DWORD OPENGL32_tls = -1;
|
||||
GLPROCESSDATA OPENGL32_processdata;
|
||||
|
||||
|
||||
|
@ -110,7 +111,7 @@ OPENGL32_ProcessAttach()
|
|||
TRUE /* bInheritHandle */ };
|
||||
|
||||
OPENGL32_tls = TlsAlloc();
|
||||
if (0xFFFFFFFF == OPENGL32_tls)
|
||||
if (-1 == OPENGL32_tls)
|
||||
return FALSE;
|
||||
|
||||
memset( &OPENGL32_processdata, 0, sizeof (OPENGL32_processdata) );
|
||||
|
@ -186,7 +187,7 @@ OPENGL32_ProcessDetach()
|
|||
CloseHandle( OPENGL32_processdata.dcdata_mutex );
|
||||
|
||||
/* free TLS */
|
||||
if (OPENGL32_tls != 0xffffffff)
|
||||
if (OPENGL32_tls != -1)
|
||||
TlsFree(OPENGL32_tls);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue