mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
[NTUSER] Lock before getting DesktopDC. Fixes crash during loading DirectX CORE-7733
svn path=/trunk/; revision=74142
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user