summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/crsr/crstrvl.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 7a7d67d4fe86..cef97092485c 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -199,7 +199,8 @@ bool SwCursorShell::SetCursorInHdFt( size_t nDescNo, bool bInHeader )
if( SIZE_MAX == nDescNo )
{
// take the current one
- const SwPageFrame* pPage = GetCurrFrame()->FindPageFrame();
+ const SwContentFrame *pCurrFrame = GetCurrFrame();
+ const SwPageFrame* pPage = (pCurrFrame == nullptr) ? nullptr : pCurrFrame->FindPageFrame();
if( pPage && pMyDoc->ContainsPageDesc(
pPage->GetPageDesc(), &nDescNo) )
pDesc = pPage->GetPageDesc();