[SHELL32] - CMenuBand: Don't accept a NULL shell folder in SetShellFolder. Should...
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Thu, 10 Nov 2016 08:10:28 +0000 (08:10 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Thu, 10 Nov 2016 08:10:28 +0000 (08:10 +0000)
svn path=/trunk/; revision=73188

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);