[SHELL32] Add check to CMenuToolbarBase::ShowDW
[reactos.git] / dll / win32 / shell32 / shellmenu / CMenuToolbars.cpp
index d99f5fc..0d5cd9c 100644 (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