summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-10-06 23:37:51 +0200
committerMichael Stahl <mstahl@redhat.com>2016-10-06 23:40:49 +0200
commit8daf6707ef203b26a744140f74d7cd231a25f0dd (patch)
treeac659839ccc1ae4b839baaf5c2dd568e8b872363 /xmloff
parente7fac51c777fd9d1383e2c83947a828eff75a073 (diff)
xmloff: fix crash in ~XMLParaContext on fdo72541-1.fodt
Change-Id: I3310699020bfea085eb62c50a7d5de25af51c1b1
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlimp.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index c061d8e7a941..0e8f50ac7ca5 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -449,6 +449,10 @@ SvXMLImport::~SvXMLImport() throw ()
{
if (mxEventListener.is() && mxModel.is())
mxModel->removeEventListener(mxEventListener);
+ // clear context stacks first in case of parse error because the context
+ // class dtors are full of application logic
+ while (!maFastContexts.empty()) { maFastContexts.pop(); }
+ while (!maContexts.empty()) { maContexts.pop(); }
}
namespace