tdf#125846 - Avoid deleting fly formats one by one
Avoid deleting fly formats one by one while the document is destroyed since DeleteAndDestroyAll removes all fly formats at once in SwDoc::~SwDoc afterwards. Change-Id: Ie62ead75a3ba1cdfa47d072c329e8d9fec9387ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211864 Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Tested-by: Jenkins
This commit is contained in:
@@ -1259,7 +1259,8 @@ void SwTextNode::DestroyAttr( SwTextAttr* pAttr )
|
||||
case RES_TXTATR_FLYCNT:
|
||||
{
|
||||
SwFrameFormat* pFormat = pAttr->GetFlyCnt().GetFrameFormat();
|
||||
if( pFormat ) // set to 0 by Undo?
|
||||
// tdf#125846 - avoid deleting fly formats one by one while the document is destroyed
|
||||
if (pFormat && !rDoc.IsInDtor()) // set to 0 by Undo?
|
||||
rDoc.getIDocumentLayoutAccess().DelLayoutFormat( pFormat );
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user