mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +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
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue