mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:32:57 +00:00
If exception occurs, leave critical section. Bug #4431.
svn path=/trunk/; revision=41779
This commit is contained in:
parent
0d5243017d
commit
bc9c521a84
1 changed files with 19 additions and 8 deletions
|
@ -1813,6 +1813,7 @@ BOOL UserDrawCaption(
|
||||||
/* FIXME: Draw the Icon when pWnd == NULL but hIcon is valid */
|
/* FIXME: Draw the Icon when pWnd == NULL but hIcon is valid */
|
||||||
if (pWnd != NULL)
|
if (pWnd != NULL)
|
||||||
UserDrawSysMenuButton(pWnd, hMemDc, &r, FALSE);
|
UserDrawSysMenuButton(pWnd, hMemDc, &r, FALSE);
|
||||||
|
|
||||||
r.left += IconWidth;
|
r.left += IconWidth;
|
||||||
r.top --;
|
r.top --;
|
||||||
}
|
}
|
||||||
|
@ -1902,9 +1903,10 @@ NtUserDrawCaptionTemp(
|
||||||
UINT uFlags)
|
UINT uFlags)
|
||||||
{
|
{
|
||||||
PWINDOW_OBJECT pWnd = NULL;
|
PWINDOW_OBJECT pWnd = NULL;
|
||||||
RECTL SafeRect;
|
|
||||||
UNICODE_STRING SafeStr = {0};
|
UNICODE_STRING SafeStr = {0};
|
||||||
BOOL Ret = FALSE;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
RECTL SafeRect;
|
||||||
|
BOOL Ret;
|
||||||
|
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
|
@ -1930,17 +1932,26 @@ NtUserDrawCaptionTemp(
|
||||||
SafeStr.Length,
|
SafeStr.Length,
|
||||||
sizeof(WCHAR));
|
sizeof(WCHAR));
|
||||||
}
|
}
|
||||||
Ret = UserDrawCaption(pWnd, hDC, &SafeRect, hFont, hIcon, &SafeStr, uFlags);
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
Ret = UserDrawCaption(pWnd, hDC, &SafeRect, hFont, hIcon, NULL, uFlags);
|
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
SetLastNtError(_SEH2_GetExceptionCode());
|
Status = _SEH2_GetExceptionCode();
|
||||||
}
|
}
|
||||||
_SEH2_END;
|
_SEH2_END;
|
||||||
|
|
||||||
|
if (Status != STATUS_SUCCESS)
|
||||||
|
{
|
||||||
|
SetLastNtError(Status);
|
||||||
|
UserLeave();
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str != NULL)
|
||||||
|
Ret = UserDrawCaption(pWnd, hDC, &SafeRect, hFont, hIcon, &SafeStr, uFlags);
|
||||||
|
else
|
||||||
|
Ret = UserDrawCaption(pWnd, hDC, &SafeRect, hFont, hIcon, NULL, uFlags);
|
||||||
|
|
||||||
UserLeave();
|
UserLeave();
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue