summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2018-01-05 13:50:18 +0100
committerMichael Stahl <mstahl@redhat.com>2018-01-05 13:51:06 +0100
commit64d5da302226504a522ad3d362cb1852351818cd (patch)
tree2ea9d0c81fd0894f8dcefb89d4887987d027608b /sw/source
parentdc7ed240d272df939ef68f64316ee77419b0e2e6 (diff)
sw: fix null-pointer crash in ClearFEShellTabCols()
(regression from 334601603aa04ea968e8a850f4e7f6cf52f7735b) Change-Id: I6e257f07a44740f77450ca6278aa2c0fa8ce2551
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/frmedt/fetab.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 8f3620e7c54c..16c640698c41 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -2085,11 +2085,15 @@ size_t SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const
void ClearFEShellTabCols(SwDoc & rDoc, SwTabFrame const*const pFrame)
{
- for (SwViewShell& rCurrentShell : rDoc.getIDocumentLayoutAccess().GetCurrentViewShell()->GetRingContainer())
+ auto const pShell(rDoc.getIDocumentLayoutAccess().GetCurrentViewShell());
+ if (pShell)
{
- if (auto pFE = dynamic_cast<SwFEShell *>(&rCurrentShell))
+ for (SwViewShell& rCurrentShell : pShell->GetRingContainer())
{
- pFE->ClearColumnRowCache(pFrame);
+ if (auto const pFE = dynamic_cast<SwFEShell *>(&rCurrentShell))
+ {
+ pFE->ClearColumnRowCache(pFrame);
+ }
}
}
}