tdf#162987: check return value of GetViewBindings

Change-Id: Iaeec22ed07e18aa59f2ab87b2ea7d8a0c7ae1467
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173435
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski
2024-09-16 16:13:15 +05:00
parent 71ea7520eb
commit 7cebd7df0c

View File

@ -407,9 +407,11 @@ void ScDBFunc::ModifiedAutoFilter(ScDocShell* pDocSh)
ScDocShellModificator aModificator(*pDocSh);
aModificator.SetDocumentModified();
SfxBindings* pBindings = pDocSh->GetViewBindings();
pBindings->Invalidate(SID_AUTO_FILTER);
pBindings->Invalidate(SID_AUTOFILTER_HIDE);
if (SfxBindings* pBindings = pDocSh->GetViewBindings())
{
pBindings->Invalidate(SID_AUTO_FILTER);
pBindings->Invalidate(SID_AUTOFILTER_HIDE);
}
}
// just hide, no data change