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>
This commit is contained in:
Caolán McNamara 2022-03-04 14:11:46 +00:00
parent ac2c0cb0cc
commit 83e1d079c4

View file

@ -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;