Author: tkreuzer
Date: Wed Nov 25 01:55:14 2015
New Revision: 70106
URL:
http://svn.reactos.org/svn/reactos?rev=70106&view=rev
Log:
[WIN32K]
Apply the same fix for EngAcquireSemaphore to EngReleaseSemaphore.
CORE-9779 #comment Yet another try please
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] Wed Nov 25 01:55:14 2015
@@ -68,7 +68,14 @@
{
//
www.osr.com/ddk/graphics/gdifncs_5u3r.htm
PTHREADINFO W32Thread;
- ASSERT(hsem);
+
+ /* On Windows a NULL hsem is ignored */
+ if (hsem == NULL)
+ {
+ DPRINT1("EngReleaseSemaphore called with hsem == NULL!\n");
+ return;
+ }
+
W32Thread = PsGetThreadWin32Thread(PsGetCurrentThread());
if (W32Thread) --W32Thread->dwEngAcquireCount;
ExReleaseResourceAndLeaveCriticalRegion((PERESOURCE)hsem);