summaryrefslogtreecommitdiff
path: root/sfx2/source/menu
diff options
context:
space:
mode:
authorDaniel Rentz <dr@openoffice.org>2010-08-05 09:51:16 +0200
committerDaniel Rentz <dr@openoffice.org>2010-08-05 09:51:16 +0200
commitc2247cb7524a6e00647b6120cd2fb3f36377ff0e (patch)
treedd6eed4d1e33f963f2daf7153c6e0e83eb0b016a /sfx2/source/menu
parent8dfe965a32b7d99d5bd70489f5f45652114ca889 (diff)
parent0e6f37318dd855bd04e3281435d1af751398c98f (diff)
dr77: rebase to m86
Diffstat (limited to 'sfx2/source/menu')
-rw-r--r--[-rwxr-xr-x]sfx2/source/menu/mnumgr.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx
index b264a5b47861..bc765b95340c 100755..100644
--- 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();
}
+