summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-02-21 11:54:04 +0000
committerAndras Timar <andras.timar@collabora.com>2022-03-09 09:17:25 +0100
commit37c776a49980a73899f10986a8421fc8136e6fe7 (patch)
tree6c1619c24564eb4e1a16eca7b8daa26e9f2b17d8 /chart2
parent6106fbf376fc7583acd8658cedd49d54a1b1f0a4 (diff)
cid#1500515 Dereference after null check
Change-Id: I6483c3a036c5c56c8c6515b5b8f08720c8bd1a6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130257 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition.cxx7
-rw-r--r--chart2/source/controller/inc/res_LegendPosition.hxx1
2 files changed, 7 insertions, 1 deletions
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index 5ad9fe1ac63d..97318f59aeb3 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -85,7 +85,7 @@ void LegendPositionResources::writeToResources( const uno::Reference< frame::XMo
xProp->getPropertyValue( "Show" ) >>= bShowLegend;
if (m_xCbxShow)
m_xCbxShow->set_active( bShowLegend );
- PositionEnableHdl(*m_xCbxShow);
+ PositionEnable();
//position
chart2::LegendPosition ePos;
@@ -160,6 +160,11 @@ void LegendPositionResources::writeToModel( const css::uno::Reference< frame::XM
IMPL_LINK_NOARG(LegendPositionResources, PositionEnableHdl, weld::Toggleable&, void)
{
+ PositionEnable();
+}
+
+void LegendPositionResources::PositionEnable()
+{
bool bEnable = !m_xCbxShow || m_xCbxShow->get_active();
m_xRbtLeft->set_sensitive( bEnable );
diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx b/chart2/source/controller/inc/res_LegendPosition.hxx
index 87b96ab558fc..d1de5010e20a 100644
--- a/chart2/source/controller/inc/res_LegendPosition.hxx
+++ b/chart2/source/controller/inc/res_LegendPosition.hxx
@@ -55,6 +55,7 @@ public:
private:
void impl_setRadioButtonToggleHdl();
+ void PositionEnable();
private:
css::uno::Reference< css::uno::XComponentContext> m_xCC;