Resolves: tdf#130340 null deref when nothing selected

Change-Id: Ie406006cbcca566ddd32fd86a7e88f0c754dd02e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88047
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index ca602f8..98f67d60 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -1181,7 +1181,7 @@ IMPL_LINK(SfxAcceleratorConfigPage, SelectHdl, weld::TreeView&, rListBox, void)
        m_xRemoveButton->set_sensitive( false );
        m_xChangeButton->set_sensitive( false );

        if (pEntry->m_bIsConfigurable)
        if (pEntry && pEntry->m_bIsConfigurable)
        {
            if (pEntry->isConfigured())
                m_xRemoveButton->set_sensitive(true);