mirror of
https://github.com/reactos/reactos.git
synced 2024-08-02 17:40:58 +00:00
fixing thread safe in GetFourCCCodes
svn path=/trunk/; revision=26853
This commit is contained in:
parent
1c247edcf4
commit
327cd7852d
|
@ -148,6 +148,9 @@ Main_DirectDraw_GetFourCCCodes(LPDIRECTDRAW7 iface, LPDWORD lpNumCodes, LPDWORD
|
|||
LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface;
|
||||
DX_WINDBG_trace();
|
||||
|
||||
/* FIXME protect with SEH or something else if lpCodes or lpNumCodes for bad user pointers */
|
||||
EnterCriticalSection(&ddcs);
|
||||
|
||||
if(!lpNumCodes)
|
||||
return DDERR_INVALIDPARAMS;
|
||||
|
||||
|
@ -156,6 +159,8 @@ Main_DirectDraw_GetFourCCCodes(LPDIRECTDRAW7 iface, LPDWORD lpNumCodes, LPDWORD
|
|||
else
|
||||
*lpNumCodes = This->lpLcl->lpGbl->dwNumFourCC;
|
||||
|
||||
|
||||
LeaveCriticalSection(&ddcs);
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue