Author: gadamopoulos
Date: Sun Jun 18 12:34:30 2017
New Revision: 75090
URL:
http://svn.reactos.org/svn/reactos?rev=75090&view=rev
Log:
[SHELL32] -CMenuBand::SetSite: Don't fail if the site doesn't support the
SID_STopLevelBrowser service.
Modified:
trunk/reactos/dll/win32/shell32/shellmenu/CMenuBand.cpp
Modified: trunk/reactos/dll/win32/shell32/shellmenu/CMenuBand.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellmen…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shellmenu/CMenuBand.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shellmenu/CMenuBand.cpp [iso-8859-1] Sun Jun 18
12:34:30 2017
@@ -240,10 +240,18 @@
CComPtr<IOleWindow> pTopLevelWindow;
hr = IUnknown_QueryService(m_site, SID_STopLevelBrowser, IID_PPV_ARG(IOleWindow,
&pTopLevelWindow));
- if (FAILED_UNEXPECTEDLY(hr))
- return hr;
-
- return pTopLevelWindow->GetWindow(&m_topLevelWindow);
+ if (SUCCEEDED(hr))
+ {
+ hr = pTopLevelWindow->GetWindow(&m_topLevelWindow);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return hr;
+ }
+ else
+ {
+ m_topLevelWindow = hwndParent;
+ }
+
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE CMenuBand::GetSite(REFIID riid, PVOID *ppvSite)