From 161c27e9884bc1b3aa92f0fd50fe17a9e11c8dc6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 21 Feb 2022 11:54:04 +0000 Subject: 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 --- chart2/source/controller/dialogs/res_LegendPosition.cxx | 7 ++++++- chart2/source/controller/inc/res_LegendPosition.hxx | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'chart2') 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; @@ -159,6 +159,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(); 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; -- cgit