mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
[RSHELL]
* CMenuBand: Refcount before assigning a return pointer. * CMenuDeskBar: Revert change and protect the refcounting in case I was wrong to assume there will be exactly one OnFinalMessage for each OnCreate. * CMenuToolbars: Add a debug message. * CStartMenu: Refcount correctly. svn path=/branches/shell-experiments/; revision=65088
This commit is contained in:
@@ -628,21 +628,22 @@ HRESULT STDMETHODCALLTYPE CMenuBand::SetClient(IUnknown *punkClient)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT hr = punkClient->QueryInterface(IID_PPV_ARG(IMenuPopup, &m_subMenuChild));
|
||||
|
||||
return hr;
|
||||
return punkClient->QueryInterface(IID_PPV_ARG(IMenuPopup, &m_subMenuChild));
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CMenuBand::GetClient(IUnknown **ppunkClient)
|
||||
{
|
||||
// HACK, so I can test for a submenu in the DeskBar
|
||||
if (ppunkClient)
|
||||
if (!ppunkClient)
|
||||
return E_POINTER;
|
||||
*ppunkClient = NULL;
|
||||
|
||||
if (m_subMenuChild)
|
||||
{
|
||||
if (m_subMenuChild)
|
||||
*ppunkClient = m_subMenuChild;
|
||||
else
|
||||
*ppunkClient = NULL;
|
||||
m_subMenuChild->AddRef();
|
||||
*ppunkClient = m_subMenuChild;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user