mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 10:01:43 +00:00
[WIN32K]
"Gracyfully" (i.e. ignore, like Windows does) handle hsem == NULL in EngAcquireSemaphore Should fix crash of QXL Virtual GPU driver installer CORE-9779 #comment Please retest. svn path=/trunk/; revision=70103
This commit is contained in:
parent
b59d06fa1d
commit
fa9f7f4b41
1 changed files with 8 additions and 1 deletions
|
@ -42,7 +42,14 @@ EngAcquireSemaphore(
|
|||
{
|
||||
// www.osr.com/ddk/graphics/gdifncs_14br.htm
|
||||
PTHREADINFO W32Thread;
|
||||
ASSERT(hsem);
|
||||
|
||||
/* On Windows a NULL hsem is ignored */
|
||||
if (hsem == NULL)
|
||||
{
|
||||
DPRINT1("EngAcquireSemaphore called with hsem == NULL!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ExEnterCriticalRegionAndAcquireResourceExclusive((PERESOURCE)hsem);
|
||||
W32Thread = PsGetThreadWin32Thread(PsGetCurrentThread());
|
||||
if (W32Thread) W32Thread->dwEngAcquireCount++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue