summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-07-11 21:32:33 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-08-18 11:50:33 +0200
commit483ad8ac7e2374aa17dc83a4bf81fff1cbbcb98d (patch)
tree33479d318bce83a6ec7bb971d246f6058d2d1847 /sw
parent7bd26828933a682b7bca86e4fb26f4cf99fa33e0 (diff)
ofz#35787 skip expensive ResetAttr if the document is in dtor
lets try it initially just for fuzzing builds Change-Id: I4ae08348c53756a8f3693ba7cd5c6c3e255d91bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118761 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 626b3b21bdd0..d76444d43011 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -255,7 +255,12 @@ SwTextNode::~SwTextNode()
InitSwParaStatistics( false );
DelFrames(nullptr); // must be called here while it's still a SwTextNode
DelFrames_TextNodePart();
+#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
+ if (!GetDoc().IsInDtor())
+ ResetAttr(RES_PAGEDESC);
+#else
ResetAttr(RES_PAGEDESC);
+#endif
InvalidateInSwCache(RES_OBJECTDYING);
}