summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-29 17:42:12 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-04-04 16:39:31 +0200
commitc4674e8a1b04314fc45f6a8269cf6519b5fc012b (patch)
tree76cfa2b7137dc6e606a3a30d0cf3ec175e6d8167 /sw/source
parent09ba4f15ec88b820fed66be339170da2fbbf11dd (diff)
forcepoint#36 avoid dangling SvTextShapeImportHelper in case of exceptions
Change-Id: Ibdbc047029c31d2b06d2349d68e1cbd9b15fd514 Reviewed-on: https://gerrit.libreoffice.org/52137 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/xml/xmlimp.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 10332ef1db08..51fc41249e43 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -413,6 +413,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;