mirror of
https://github.com/reactos/reactos.git
synced 2024-11-23 11:33:31 +08:00
[NTUSER] VerifyWnd: Remove pointless SEH and simplify the function (#5125)
This commit is contained in:
parent
d09072626b
commit
640e2283d4
@ -85,34 +85,22 @@ PWND FASTCALL IntGetWindowObject(HWND hWnd)
|
||||
|
||||
PWND FASTCALL VerifyWnd(PWND pWnd)
|
||||
{
|
||||
HWND hWnd;
|
||||
UINT State, State2;
|
||||
ULONG Error;
|
||||
ULONG Error;
|
||||
|
||||
if (!pWnd) return NULL;
|
||||
if (!pWnd ||
|
||||
(pWnd->state & WNDS_DESTROYED) ||
|
||||
(pWnd->state2 & WNDS2_INDESTROY))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Error = EngGetLastError();
|
||||
Error = EngGetLastError();
|
||||
|
||||
_SEH2_TRY
|
||||
{
|
||||
hWnd = UserHMGetHandle(pWnd);
|
||||
State = pWnd->state;
|
||||
State2 = pWnd->state2;
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
EngSetLastError(Error);
|
||||
_SEH2_YIELD(return NULL);
|
||||
}
|
||||
_SEH2_END
|
||||
if (UserObjectInDestroy(UserHMGetHandle(pWnd)))
|
||||
pWnd = NULL;
|
||||
|
||||
if ( UserObjectInDestroy(hWnd) ||
|
||||
State & WNDS_DESTROYED ||
|
||||
State2 & WNDS2_INDESTROY )
|
||||
pWnd = NULL;
|
||||
|
||||
EngSetLastError(Error);
|
||||
return pWnd;
|
||||
EngSetLastError(Error);
|
||||
return pWnd;
|
||||
}
|
||||
|
||||
PWND FASTCALL ValidateHwndNoErr(HWND hWnd)
|
||||
|
Loading…
Reference in New Issue
Block a user