diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-09-21 10:41:48 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-09-21 10:41:48 +0200 |
commit | cdab9168e50a965d25e2dd3674097fe5b85f9a83 (patch) | |
tree | c0f9da05a9c3ac7c4a4ca0092d12679038124100 /cui | |
parent | 50d18827d89bd10099e16e43e3ab72dd493ee23f (diff) | |
parent | c563a4de7e78483b80e54c99e4d5e055f459cc8f (diff) |
dba34a: merge
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfg.cxx | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 4f389de6f560..91a5bf7a88dd 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1176,7 +1176,11 @@ bool MenuSaveInData::LoadSubMenus( const OUString& rBaseTitle, SvxConfigEntry* pParentData ) { - SvxEntries* pEntries = pParentData->GetEntries(); + SvxEntries* pEntries = pParentData->GetEntries(); + + // Don't access non existing menu configuration! + if ( !xMenuSettings.is() ) + return true; for ( sal_Int32 nIndex = 0; nIndex < xMenuSettings->getCount(); nIndex++ ) { @@ -2593,17 +2597,20 @@ IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox ) SvxConfigEntry* pMenuData = GetTopLevelSelection(); PopupMenu* pPopup = aModifyTopLevelButton.GetPopupMenu(); - pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() ); - pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() ); - pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() ); + if ( pMenuData ) + { + pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() ); + pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() ); + pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() ); - SvxEntries* pEntries = pMenuData->GetEntries(); - SvxEntries::const_iterator iter = pEntries->begin(); + SvxEntries* pEntries = pMenuData->GetEntries(); + SvxEntries::const_iterator iter = pEntries->begin(); - for ( ; iter != pEntries->end(); iter++ ) - { - SvxConfigEntry* pEntry = *iter; - InsertEntryIntoUI( pEntry ); + for ( ; iter != pEntries->end(); iter++ ) + { + SvxConfigEntry* pEntry = *iter; + InsertEntryIntoUI( pEntry ); + } } UpdateButtonStates(); |