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 e0f2887736aebf1244dc85ae7e05e65e1e3fb988
Author: Caolán McNamara <caol...@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/52136
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <michael.st...@cib.de>

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 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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to