"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:
Timo Kreuzer 2015-11-24 22:04:39 +00:00
parent b59d06fa1d
commit fa9f7f4b41

View file

@ -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++;