summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/dbfunc3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/dbfunc3.cxx')
-rw-r--r--sc/source/ui/view/dbfunc3.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 52942816c138..424d416fdd4f 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -2274,9 +2274,15 @@ void ScDBFunc::OnLOKShowHideColRow(bool bColumns, SCCOLROW nStart)
if (pTabViewShell && pTabViewShell->GetDocId() == pThisViewShell->GetDocId())
{
if (bColumns)
- pTabViewShell->GetViewData().GetLOKWidthHelper(nCurrentTabIndex)->invalidateByIndex(nStart);
+ {
+ if (ScPositionHelper* pPosHelper = pTabViewShell->GetViewData().GetLOKWidthHelper(nCurrentTabIndex))
+ pPosHelper->invalidateByIndex(nStart);
+ }
else
- pTabViewShell->GetViewData().GetLOKHeightHelper(nCurrentTabIndex)->invalidateByIndex(nStart);
+ {
+ if (ScPositionHelper* pPosHelper = pTabViewShell->GetViewData().GetLOKHeightHelper(nCurrentTabIndex))
+ pPosHelper->invalidateByIndex(nStart);
+ }
if (pTabViewShell->getPart() == nCurrentTabIndex)
{