diff options
author | Matt K <mattkse@gmail.com> | 2024-02-03 17:04:19 -0600 |
---|---|---|
committer | Matt K <mattkse@gmail.com> | 2024-02-28 22:08:38 +0100 |
commit | 6a064b1967e06e40be40817deff99d00c1a8554f (patch) | |
tree | 4c5f0c5c6a653091d8efad37b1a8a1739df65d1e /sw/source/core/doc/fmtcol.cxx | |
parent | b8237d35d9f90d1dfdd35f24af8729d668029e2c (diff) |
tdf#139004 Prevent crash when deleting footnote styles
The problem was that a pointer was assumed valid, but
was not, so now we check the value of the pointer
before using it. Works now to delete footnote style.
Also, change assert to variable check to ensure the
proper method is only called when it is supposed to
be, and to prevent a failing assert. We add a new
Destr method on SwFormat so that it can be called
from the SwTextFormatColl context and thus avoid
the assert.
Change-Id: Ia4b8029fb89e627cd685b3317606e2b9d60cf248
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162965
Tested-by: Jenkins
Reviewed-by: Matt K <mattkse@gmail.com>
Diffstat (limited to 'sw/source/core/doc/fmtcol.cxx')
-rw-r--r-- | sw/source/core/doc/fmtcol.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx index 4d87241a03ba..02f2cb5bc2fd 100644 --- a/sw/source/core/doc/fmtcol.cxx +++ b/sw/source/core/doc/fmtcol.cxx @@ -124,6 +124,7 @@ SwTextFormatColl::~SwTextFormatColl() pCharFormat->SetLinkedParaFormat(nullptr); } } + Destr(); } void SwTextFormatColl::SwClientNotify(const SwModify& rModify, const SfxHint& rHint) { |