[SHELL32] - CMenuBand: Don't accept a NULL shell folder in SetShellFolder. Should...
[reactos.git] / reactos / dll / win32 / shell32 / shellmenu / CMenuBand.cpp
index 8826da9..1e87eac 100644 (file)
@@ -672,6 +672,9 @@ HRESULT STDMETHODCALLTYPE CMenuBand::TranslateMenuMessage(MSG *pmsg, LRESULT *pl
 
 HRESULT STDMETHODCALLTYPE CMenuBand::SetShellFolder(IShellFolder *psf, LPCITEMIDLIST pidlFolder, HKEY hKey, DWORD dwFlags)
 {
+    if (!psf)
+        return E_INVALIDARG;
+
     if (m_SFToolbar == NULL)
     {
         m_SFToolbar = new CMenuSFToolbar(this);