sw: fix crash in SwTextNode::Update
FindPageFrame might return nullptr
Introduced with c684301352
"(related: tdf#149595) sw: also re-sort SwSortedObjs on SwPageFrame"
See https://crashreport.libreoffice.org/stats/signature/SwTextNode::Update(SwContentIndex%20const%20&,long,SwContentIndexReg::UpdateMode)
Change-Id: I2e8df1428400f6752eafaaa6102a1fc3de3f0daa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153977
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
This commit is contained in:
committed by
Michael Stahl
parent
45d7ffb7f2
commit
a62af04445
@@ -1603,7 +1603,9 @@ void SwTextNode::Update(
|
||||
pSortedObjs->UpdateAll();
|
||||
}
|
||||
// also sort the objs on the page frame
|
||||
pSortedObjs = pFrame->FindPageFrame()->GetSortedObjs();
|
||||
if (SwPageFrame *pPage = pFrame->FindPageFrame())
|
||||
pSortedObjs = pPage->GetSortedObjs();
|
||||
|
||||
if (pSortedObjs) // doesn't exist yet if called for inserting as-char fly
|
||||
{
|
||||
pSortedObjs->UpdateAll();
|
||||
|
Reference in New Issue
Block a user