https://git.reactos.org/?p=reactos.git;a=commitdiff;h=49639c77599c9c7dbc742…
commit 49639c77599c9c7dbc742846a5498f5f05348b50
Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com>
AuthorDate: Thu Mar 25 11:51:29 2021 +0100
Commit: GitHub <noreply(a)github.com>
CommitDate: Thu Mar 25 19:51:29 2021 +0900
[ATL] CWindowImplBaseT::WindowProc(): Narrow 2 ATLASSERT() down (#3529)
Addendum to e076e05. CORE-17505
---
sdk/lib/atl/atlwin.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/sdk/lib/atl/atlwin.h b/sdk/lib/atl/atlwin.h
index c25fd1404d0..214c2959789 100644
--- a/sdk/lib/atl/atlwin.h
+++ b/sdk/lib/atl/atlwin.h
@@ -1579,9 +1579,12 @@ public:
LONG_PTR saveWindowProc;
ATLASSERT(pThis != NULL);
- ATLASSERT(pThis != NULL && (pThis->m_dwState & WINSTATE_DESTROYED)
== 0);
- ATLASSERT(pThis != NULL && pThis->m_hWnd != NULL);
- if (pThis == NULL || (pThis->m_dwState & WINSTATE_DESTROYED) != 0 ||
pThis->m_hWnd == NULL)
+ if (pThis == NULL)
+ return 0;
+
+ ATLASSERT((pThis->m_dwState & WINSTATE_DESTROYED) == 0);
+ ATLASSERT(pThis->m_hWnd != NULL);
+ if ((pThis->m_dwState & WINSTATE_DESTROYED) != 0 || pThis->m_hWnd ==
NULL)
return 0;
hWnd = pThis->m_hWnd;