summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-29 17:42:12 +0100
committerAndras Timar <andras.timar@collabora.com>2018-04-12 10:51:35 +0200
commit629fbf9a85f7a4d49914e594941a624a3d98108d (patch)
tree11047e1845a9c5d699754122f3c7000a3eed2260 /sw/source/filter
parent765ad2fc84af58278e78604c67a883b5dfcfc0a3 (diff)
forcepoint#36 avoid dangling SvTextShapeImportHelper in case of exceptions
Change-Id: Ibdbc047029c31d2b06d2349d68e1cbd9b15fd514 Reviewed-on: https://gerrit.libreoffice.org/52136 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit e0f2887736aebf1244dc85ae7e05e65e1e3fb988)
Diffstat (limited to 'sw/source/filter')
-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 cb2e6a64eae8..dfbc7f832105 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -411,6 +411,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;