Author: tkreuzer
Date: Tue Nov 24 22:04:39 2015
New Revision: 70103
URL:
http://svn.reactos.org/svn/reactos?rev=70103&view=rev
Log:
[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.
Modified:
trunk/reactos/win32ss/gdi/eng/semaphor.c
Modified: trunk/reactos/win32ss/gdi/eng/semaphor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/semaphor.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/semaphor.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/semaphor.c [iso-8859-1] Tue Nov 24 22:04:39 2015
@@ -42,7 +42,14 @@
{
//
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++;