cui/source/customize/SvxMenuConfigPage.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
New commits: commit c98b7c9e75a951012d6693f5adecb1ff0e1f8f6b Author: Muhammet Kara <muhammet.k...@collabora.com> AuthorDate: Thu Jun 13 13:19:05 2019 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Jun 13 19:41:32 2019 +0200 Resolves tdf#125840: Crash when trying to customize Base Data View toolbar Change-Id: If5b157c1f1362128d22d210286da741ba905e5aa Reviewed-on: https://gerrit.libreoffice.org/73958 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/cui/source/customize/SvxMenuConfigPage.cxx b/cui/source/customize/SvxMenuConfigPage.cxx index bf0247ca5f2c..03e3f9ac046d 100644 --- a/cui/source/customize/SvxMenuConfigPage.cxx +++ b/cui/source/customize/SvxMenuConfigPage.cxx @@ -223,10 +223,14 @@ void SvxMenuConfigPage::UpdateButtonStates() { SvxConfigEntry* pMenuData = GetTopLevelSelection(); PopupMenu* pGearPopup = m_pGearBtn->GetPopupMenu(); + + if (!pGearPopup) + return; + // Add option (gear_add) will always be enabled - pGearPopup->EnableItem( "gear_delete", pMenuData->IsDeletable() ); - pGearPopup->EnableItem( "gear_rename", pMenuData->IsRenamable() ); - pGearPopup->EnableItem( "gear_move", pMenuData->IsMovable() ); + pGearPopup->EnableItem( "gear_delete", pMenuData && pMenuData->IsDeletable() ); + pGearPopup->EnableItem( "gear_rename", pMenuData && pMenuData->IsRenamable() ); + pGearPopup->EnableItem( "gear_move", pMenuData && pMenuData->IsMovable() ); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits