diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-29 17:42:12 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-04-07 17:43:46 +0200 |
commit | 65dfa40f3139103258fbf5555b34a1aae367b14a (patch) | |
tree | 4cc5e3260430d0b68a40c6354f22ce270b5949c8 /sw | |
parent | 1801bbe33a8383576231ebbc93f66b8ef5e56a93 (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>
(cherry picked from commit c4674e8a1b04314fc45f6a8269cf6519b5fc012b)
Diffstat (limited to 'sw')
-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 a2f911417da0..c06c7453f62f 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -444,6 +444,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; |