diff options
author | Thomas Lange [tl] <tl@openoffice.org> | 2010-06-28 13:58:27 +0200 |
---|---|---|
committer | Thomas Lange [tl] <tl@openoffice.org> | 2010-06-28 13:58:27 +0200 |
commit | f0d1e8724c1fe1fe4c8e9d7febd4e7c30bc99636 (patch) | |
tree | 31d62f0f1f8fe3e77c9772a5a03f2747fdd54c69 /sfx2 | |
parent | 35f02192db00361fc547b6a18bd78a49fbe9b4f2 (diff) |
cws tl81: #i112695# crash in synonym sub-menu fixed
Diffstat (limited to 'sfx2')
-rwxr-xr-x | sfx2/source/menu/mnumgr.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 8269611c97..c30a658f1f 100755 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -578,6 +578,7 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra return 0; } + void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFrame, const Point& rPoint, Window* pWindow ) { PopupMenu *pSVMenu = new PopupMenu( rResId ); @@ -622,6 +623,12 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram SfxPopupMenuManager aPop( pSVMenu, pFrame->GetBindings() ); aPop.RemoveDisabledEntries(); aPop.Execute( rPoint, pWindow ); + + // #i112646 avoid crash when context menu is closed. + // the (manually inserted) sub-menu needs to be destroyed before + // aPop gets destroyed. + delete pThesSubMenu; + pThesSubMenu = 0; } delete pThesSubMenu; @@ -631,3 +638,4 @@ Menu* SfxPopupMenuManager::GetSVMenu() { return (Menu*) GetMenu()->GetSVMenu(); } + |