[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

Muhammet Kara (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 13 17:42:14 UTC 2019


 cui/source/customize/SvxMenuConfigPage.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit c98b7c9e75a951012d6693f5adecb1ff0e1f8f6b
Author:     Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Thu Jun 13 13:19:05 2019 +0200
Commit:     Michael Weghorn <m.weghorn at 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.weghorn at 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() );
     }
 }
 


More information about the Libreoffice-commits mailing list