Skip to content

Commit 888540c

Browse files
committed
[BROWSEUI] Check if ATL windows are valid, before destroying them
Prevents ATL assertion failure.
1 parent 40b4551 commit 888540c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dll/win32/browseui/CAutoComplete.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,9 +1584,9 @@ LRESULT CAutoComplete::OnNCDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
15841584
m_hwndSizeBox.m_pDropDown = NULL;
15851585

15861586
// destroy controls
1587-
m_hwndList.DestroyWindow();
1588-
m_hwndScrollBar.DestroyWindow();
1589-
m_hwndSizeBox.DestroyWindow();
1587+
if (m_hwndList) m_hwndList.DestroyWindow();
1588+
if (m_hwndScrollBar) m_hwndScrollBar.DestroyWindow();
1589+
if (m_hwndSizeBox) m_hwndSizeBox.DestroyWindow();
15901590

15911591
// clean up
15921592
m_hwndCombo = NULL;

0 commit comments

Comments
 (0)