diff options
author | Henning Brinkmann <hbrinkm@openoffice.org> | 2010-07-28 17:27:27 +0200 |
---|---|---|
committer | Henning Brinkmann <hbrinkm@openoffice.org> | 2010-07-28 17:27:27 +0200 |
commit | 9141d3977c9aa5db71b5ee81aee3093f0102b37a (patch) | |
tree | 62f5489af81ccb50ee1deef44c41ebf03b88e285 /sfx2 | |
parent | a8f1ad65612c0e54969cabc541b183062ae3d905 (diff) | |
parent | 85a4e97dc97a88c59ab0cf8a4d89d9f9413adf9f (diff) |
writerfilter08ooo330: merged OOO330_m2
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 b264a5b47861..bc765b95340c 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(); } + |