mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 19:12:12 +00:00
[RSHELL]
* Fix HMENU leak in menu-based shell popups (and menubar). svn path=/branches/shell-experiments/; revision=64960
This commit is contained in:
parent
108d7f2057
commit
fa016aa3a8
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue