Author: sgasiorek
Date: Fri Mar 10 16:33:45 2017
New Revision: 74142
URL:
http://svn.reactos.org/svn/reactos?rev=74142&view=rev
Log:
[NTUSER] Lock before getting DesktopDC. Fixes crash during loading DirectX CORE-7733
Modified:
trunk/reactos/win32ss/user/ntuser/desktop.c
Modified: trunk/reactos/win32ss/user/ntuser/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/deskto…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] Fri Mar 10 16:33:45 2017
@@ -932,6 +932,8 @@
PWND DesktopObject = 0;
HDC DesktopHDC = 0;
+ UserEnterExclusive();
+
if (DcType == DC_TYPE_DIRECT)
{
DesktopObject = UserGetDesktopWindow();
@@ -942,6 +944,8 @@
PMONITOR pMonitor = UserGetPrimaryMonitor();
DesktopHDC = IntGdiCreateDisplayDC(pMonitor->hDev, DcType, EmptyDC);
}
+
+ UserLeave();
return DesktopHDC;
}