diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-03-04 14:11:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-03-04 17:49:01 +0100 |
commit | 83e1d079c4304ed43dfe8f9c92490d1bd4963f4c (patch) | |
tree | f19a7cd03f8d28a2390595ff79971280c41419fa /svx/source/sidebar/shadow | |
parent | ac2c0cb0ccb7e8978ec64059901e4b2aa44f239f (diff) |
cid#1500667 Explicit null dereferenced
I can't see how destroyingthe widget is a good idea here
Change-Id: Ie4b2dcf9136568b01b5f4b85bcc849ad1c0504a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130992
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/sidebar/shadow')
-rw-r--r-- | svx/source/sidebar/shadow/ShadowPropertyPanel.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx index ff21110a2007..93259adc27f0 100644 --- a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx +++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx @@ -271,15 +271,10 @@ void ShadowPropertyPanel::NotifyItemUpdate( if(eState >= SfxItemState::DEFAULT) { const SdrOnOffItem* pItem = dynamic_cast< const SdrOnOffItem* >(pState); - if(pItem) - { - if (pItem->GetValue()) - mxShowShadow->set_state(TRISTATE_TRUE); - else - mxShowShadow->set_state(TRISTATE_FALSE); - } + if (pItem && pItem->GetValue()) + mxShowShadow->set_state(TRISTATE_TRUE); else - mxShowShadow.reset(); + mxShowShadow->set_state(TRISTATE_FALSE); } } break; |