From 888540c2d3df1ee65adaa20dc5a8c04f12444689 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 15 Jan 2025 17:02:41 +0200 Subject: [PATCH] [BROWSEUI] Check if ATL windows are valid, before destroying them Prevents ATL assertion failure. --- dll/win32/browseui/CAutoComplete.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dll/win32/browseui/CAutoComplete.cpp b/dll/win32/browseui/CAutoComplete.cpp index e05c31b8b76..075654109b8 100644 --- a/dll/win32/browseui/CAutoComplete.cpp +++ b/dll/win32/browseui/CAutoComplete.cpp @@ -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;