* Fix HMENU leak in menu-based shell popups (and menubar).

svn path=/branches/shell-experiments/; revision=64960
This commit is contained in:
David Quintana 2014-10-24 16:03:58 +00:00
parent 108d7f2057
commit fa016aa3a8

View file

@ -72,6 +72,9 @@ CMenuBand::~CMenuBand()
if (m_SFToolbar)
delete m_SFToolbar;
if (m_hmenu)
DestroyMenu(m_hmenu);
}
HRESULT STDMETHODCALLTYPE CMenuBand::Initialize(
@ -129,6 +132,12 @@ HRESULT STDMETHODCALLTYPE CMenuBand::SetMenu(
BOOL created = FALSE;
if (m_hmenu)
{
DestroyMenu(m_hmenu);
m_hmenu = NULL;
}
if (m_staticToolbar == NULL)
{
m_staticToolbar = new CMenuStaticToolbar(this);