From 8daf6707ef203b26a744140f74d7cd231a25f0dd Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 6 Oct 2016 23:37:51 +0200 Subject: xmloff: fix crash in ~XMLParaContext on fdo72541-1.fodt Change-Id: I3310699020bfea085eb62c50a7d5de25af51c1b1 --- xmloff/source/core/xmlimp.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xmloff') 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 -- cgit