Kaydet (Commit) 77d075fa authored tarafından Juergen Funk's avatar Juergen Funk Kaydeden (comit) Michael Stahl

sw: tdf#119742 fix null pointer in SetCursorInHdFt

In SwWrtShell::ChangeHeaderOrFooter the ChgPageDesc destroys the frames
of the header, that's why GetCurrFrame returns null later.

Change-Id: I26915237c8b455a5b8ad0bbd5c2de38537dfef08
Reviewed-on: https://gerrit.libreoffice.org/60130Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
Tested-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 4b3430f2
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment