diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-21 11:54:04 +0000 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-03-10 10:33:10 +0100 |
commit | 57041f8214e77d707cf6a13825aed584d9b1e877 (patch) | |
tree | 9b4a2de5cf345c634734ee819401a08e47a17b8c | |
parent | Fix flaky test on Win64 (diff) | |
download | core-57041f8214e77d707cf6a13825aed584d9b1e877.tar.gz core-57041f8214e77d707cf6a13825aed584d9b1e877.zip |
cid#1500515 Dereference after null check
Change-Id: I6483c3a036c5c56c8c6515b5b8f08720c8bd1a6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130258
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-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; |