mirror of
https://github.com/reactos/reactos.git
synced 2024-07-07 05:05:09 +00:00
[NTUSER] Lock before getting DesktopDC. Fixes crash during loading DirectX CORE-7733
svn path=/trunk/; revision=74142
This commit is contained in:
parent
29bf877001
commit
c6af963e8d
|
@ -932,6 +932,8 @@ UserGetDesktopDC(ULONG DcType, BOOL EmptyDC, BOOL ValidatehWnd)
|
||||||
PWND DesktopObject = 0;
|
PWND DesktopObject = 0;
|
||||||
HDC DesktopHDC = 0;
|
HDC DesktopHDC = 0;
|
||||||
|
|
||||||
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (DcType == DC_TYPE_DIRECT)
|
if (DcType == DC_TYPE_DIRECT)
|
||||||
{
|
{
|
||||||
DesktopObject = UserGetDesktopWindow();
|
DesktopObject = UserGetDesktopWindow();
|
||||||
|
@ -943,6 +945,8 @@ UserGetDesktopDC(ULONG DcType, BOOL EmptyDC, BOOL ValidatehWnd)
|
||||||
DesktopHDC = IntGdiCreateDisplayDC(pMonitor->hDev, DcType, EmptyDC);
|
DesktopHDC = IntGdiCreateDisplayDC(pMonitor->hDev, DcType, EmptyDC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UserLeave();
|
||||||
|
|
||||||
return DesktopHDC;
|
return DesktopHDC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue