Kaydet (Commit) 5c18404e authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#3635: fix leak

Change-Id: I8656b09db63c85104d60145e63591de916715e53
Reviewed-on: https://gerrit.libreoffice.org/43369Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst abe3af8e
...@@ -414,8 +414,18 @@ void SvXMLImport::cleanup() throw () ...@@ -414,8 +414,18 @@ void SvXMLImport::cleanup() throw ()
mxModel->removeEventListener(mxEventListener); mxModel->removeEventListener(mxEventListener);
// clear context stacks first in case of parse error because the context // clear context stacks first in case of parse error because the context
// class dtors are full of application logic // class dtors are full of application logic
while (!maFastContexts.empty()) { maFastContexts.pop(); } while (!maFastContexts.empty())
while (!maContexts.empty()) { maContexts.pop(); } {
if (SvXMLStylesContext* pStylesContext = dynamic_cast<SvXMLStylesContext*>(maFastContexts.top().get()))
pStylesContext->Clear();
maFastContexts.pop();
}
while (!maContexts.empty())
{
if (SvXMLStylesContext* pStylesContext = dynamic_cast<SvXMLStylesContext*>(maContexts.top().get()))
pStylesContext->Clear();
maContexts.pop();
}
DisposingModel(); DisposingModel();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment