mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 12:23:30 +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:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user