summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/html/swhtml.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 0f5810542878..a5dfee53c528 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -412,6 +412,14 @@ SwHTMLParser::~SwHTMLParser()
#ifdef DBG_UTIL
OSL_ENSURE( !m_nContinue, "DTOR in continue!" );
#endif
+
+ OSL_ENSURE(m_aContexts.empty(), "There are still contexts on the stack");
+ while (!m_aContexts.empty())
+ {
+ std::unique_ptr<HTMLAttrContext> xCntxt(PopContext());
+ ClearContext(xCntxt.get());
+ }
+
bool bAsync = m_xDoc->IsInLoadAsynchron();
m_xDoc->SetInLoadAsynchron( false );
m_xDoc->getIDocumentSettingAccess().set(DocumentSettingId::HTML_MODE, m_bOldIsHTMLMode);