[Libreoffice-commits] core.git: sw/qa sw/source
Caolán McNamara
caolanm at redhat.com
Thu Mar 29 23:27:11 UTC 2018
sw/qa/core/data/odt/fail/forcepoint-dtor-1.odt |binary
sw/source/filter/xml/xmlimp.cxx | 5 +++++
2 files changed, 5 insertions(+)
New commits:
commit d74e54824e7ad130e2d221c8f951092462dba547
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Mar 29 17:42:12 2018 +0100
forcepoint#36 avoid dangling SvTextShapeImportHelper in case of exceptions
Change-Id: Ibdbc047029c31d2b06d2349d68e1cbd9b15fd514
Reviewed-on: https://gerrit.libreoffice.org/52135
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/qa/core/data/odt/fail/forcepoint-dtor-1.odt b/sw/qa/core/data/odt/fail/forcepoint-dtor-1.odt
new file mode 100755
index 000000000000..6442200cdeda
Binary files /dev/null and b/sw/qa/core/data/odt/fail/forcepoint-dtor-1.odt differ
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 1a4988339d5a..8def02edd002 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -431,6 +431,11 @@ SwXMLImport::SwXMLImport(
SwXMLImport::~SwXMLImport() throw ()
{
+ if (HasShapeImport())
+ {
+ SAL_WARN("sw", "endDocument skipped, dropping shapes now to avoid dangling SvTextShapeImportHelper pointing to this");
+ ClearShapeImport();
+ }
delete m_pDocElemTokenMap;
delete m_pTableElemTokenMap;
delete m_pTableCellAttrTokenMap;
More information about the Libreoffice-commits
mailing list