diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-21 11:54:04 +0000 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-03-07 15:12:03 +0100 |
commit | 161c27e9884bc1b3aa92f0fd50fe17a9e11c8dc6 (patch) | |
tree | 436578fc8d94dbd6f1b59be325eb8759e9ac263f /chart2 | |
parent | tdf#140077 sw_redlinehide: fix crash on SplitNode() (diff) | |
download | core-161c27e9884bc1b3aa92f0fd50fe17a9e11c8dc6.tar.gz core-161c27e9884bc1b3aa92f0fd50fe17a9e11c8dc6.zip |
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.cxx | 7 | ||||
-rw-r--r-- | chart2/source/controller/inc/res_LegendPosition.hxx | 1 |
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; |