[NTUSER] Lock before getting DesktopDC. Fixes crash during loading DirectX CORE-7733

svn path=/trunk/; revision=74142
This commit is contained in:
Sebastian Gasiorek 2017-03-10 16:33:45 +00:00
parent 29bf877001
commit c6af963e8d

View file

@ -932,6 +932,8 @@ UserGetDesktopDC(ULONG DcType, BOOL EmptyDC, BOOL ValidatehWnd)
PWND DesktopObject = 0;
HDC DesktopHDC = 0;
UserEnterExclusive();
if (DcType == DC_TYPE_DIRECT)
{
DesktopObject = UserGetDesktopWindow();
@ -943,6 +945,8 @@ UserGetDesktopDC(ULONG DcType, BOOL EmptyDC, BOOL ValidatehWnd)
DesktopHDC = IntGdiCreateDisplayDC(pMonitor->hDev, DcType, EmptyDC);
}
UserLeave();
return DesktopHDC;
}