[SHELL32] Add check to CMenuToolbarBase::ShowDW

This fixes an ATL assert in shell32_apitest:menu
This commit is contained in:
Timo Kreuzer 2022-12-13 10:30:48 +02:00
parent c5158963a3
commit d0c1df7882

View file

@ -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