[ATL] CWindowImplBaseT::WindowProc(): Narrow 2 ATLASSERT() down (#3529)

Addendum to e076e05. CORE-17505
This commit is contained in:
Serge Gautherie 2021-03-25 11:51:29 +01:00 committed by GitHub
parent eba68ffb9c
commit 49639c7759
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;