diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-29 17:42:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-30 01:26:43 +0200 |
commit | d74e54824e7ad130e2d221c8f951092462dba547 (patch) | |
tree | d7c7ce4bf0446473f4f8dc7c0ef319d7e60ee6bc | |
parent | 3ea82be2ca7e1d65c718097ccc674ae98ecd98c5 (diff) |
forcepoint#36 avoid dangling SvTextShapeImportHelper in case of exceptions
Change-Id: Ibdbc047029c31d2b06d2349d68e1cbd9b15fd514
Reviewed-on: https://gerrit.libreoffice.org/52135
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rwxr-xr-x | sw/qa/core/data/odt/fail/forcepoint-dtor-1.odt | bin | 0 -> 220389 bytes | |||
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 5 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sw/qa/core/data/odt/fail/forcepoint-dtor-1.odt b/sw/qa/core/data/odt/fail/forcepoint-dtor-1.odt Binary files differnew file mode 100755 index 000000000000..6442200cdeda --- /dev/null +++ b/sw/qa/core/data/odt/fail/forcepoint-dtor-1.odt 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; |