[BROWSEUI] Check if ATL windows are valid, before destroying them

Prevents ATL assertion failure.
This commit is contained in:
Timo Kreuzer 2025-01-15 17:02:41 +02:00
parent 40b45515a4
commit 888540c2d3

View file

@ -1584,9 +1584,9 @@ LRESULT CAutoComplete::OnNCDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
m_hwndSizeBox.m_pDropDown = NULL;
// destroy controls
m_hwndList.DestroyWindow();
m_hwndScrollBar.DestroyWindow();
m_hwndSizeBox.DestroyWindow();
if (m_hwndList) m_hwndList.DestroyWindow();
if (m_hwndScrollBar) m_hwndScrollBar.DestroyWindow();
if (m_hwndSizeBox) m_hwndSizeBox.DestroyWindow();
// clean up
m_hwndCombo = NULL;