[BROWSEUI] Fix CAutoComplete::OnMeasureItem assertion
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Thu, 11 Mar 2021 07:55:49 +0000 (16:55 +0900)
committerKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Thu, 11 Mar 2021 07:56:01 +0000 (16:56 +0900)
CORE-17505

dll/win32/browseui/CAutoComplete.cpp

index 9bb6405..b5dfa88 100644 (file)
@@ -1781,7 +1781,8 @@ LRESULT CAutoComplete::OnMeasureItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BO
     ATLASSERT(pMeasure != NULL);
     if (pMeasure->CtlType != ODT_LISTVIEW)
         return FALSE;
-
+    if (!m_hwndList)
+        return FALSE;
     ATLASSERT(m_hwndList.GetStyle() & LVS_OWNERDRAWFIXED);
     pMeasure->itemHeight = m_hwndList.m_cyItem; // height of item
     return TRUE;