From d0c1df78821e6229f23e3be1d638f550a8f83e45 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Tue, 13 Dec 2022 10:30:48 +0200 Subject: [PATCH] [SHELL32] Add check to CMenuToolbarBase::ShowDW This fixes an ATL assert in shell32_apitest:menu --- dll/win32/shell32/shellmenu/CMenuToolbars.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dll/win32/shell32/shellmenu/CMenuToolbars.cpp b/dll/win32/shell32/shellmenu/CMenuToolbars.cpp index d99f5fc2e5f..0d5cd9ce514 100644 --- a/dll/win32/shell32/shellmenu/CMenuToolbars.cpp +++ b/dll/win32/shell32/shellmenu/CMenuToolbars.cpp @@ -315,6 +315,9 @@ void CMenuToolbarBase::InvalidateDraw() HRESULT CMenuToolbarBase::ShowDW(BOOL fShow) { + if (m_hWnd == NULL) + return S_FALSE; + ShowWindow(fShow ? SW_SHOW : SW_HIDE); // Ensure that the right image list is assigned to the toolbar