diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-07-30 11:44:23 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-07-30 11:49:18 +0200 |
commit | 36efa8c6a8ffcad1b285caa4cfda138a900becf7 (patch) | |
tree | 31e24d2f1635dff55bb26e79082fbb53aa80a99f | |
parent | 739226133373960e42416da95216b7c736d572c6 (diff) |
Related rhbz#98977: Handle multiple LibXSLTTransformer::terminate calls
Trying to reproduce rhbz#98977, temporarily changing TRANSFORMATION_TIMEOUT_SEC
(filter/source/xsltfilter/XSLTFilter.cxx) to zero, loading a dummy "Microsoft
Excel 2003 XML (.xml)" file shows a "General input/output error" msg box and
"Cancel" leads to a crash due to duplicate calls to m_tcontrol->terminate() from
both XSLTFilter::importer and XSLTFilter::endDocument (both
filter/source/xsltfilter/XSLTFilter.cxx).
Change-Id: Ia103d944f3e1f14ca2cf5552ca3a48348132d38e
-rw-r--r-- | filter/source/xsltfilter/LibXSLTTransformer.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx index 65d3725814ca..c0abb8831323 100644 --- a/filter/source/xsltfilter/LibXSLTTransformer.cxx +++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx @@ -464,8 +464,11 @@ namespace XSLT void LibXSLTTransformer::terminate() throw (RuntimeException) { - m_Reader->terminate(); - m_Reader->join(); + if (m_Reader.is()) + { + m_Reader->terminate(); + m_Reader->join(); + } m_Reader.clear(); m_parameters.clear(); } |