[Libreoffice-commits] core.git: sw/source
Michael Stahl
mstahl at redhat.com
Fri Jan 5 12:53:28 UTC 2018
sw/source/core/frmedt/fetab.cxx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 64d5da302226504a522ad3d362cb1852351818cd
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jan 5 13:50:18 2018 +0100
sw: fix null-pointer crash in ClearFEShellTabCols()
(regression from 334601603aa04ea968e8a850f4e7f6cf52f7735b)
Change-Id: I6e257f07a44740f77450ca6278aa2c0fa8ce2551
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);
+ }
}
}
}
More information about the Libreoffice-commits
mailing list