[Libreoffice-commits] .: unoxml/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Nov 14 07:04:35 PST 2012


 unoxml/source/xpath/xpathapi.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 57601d3849a7aaaa08dce8d910832892204d2922
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 14 16:02:12 2012 +0100

    Reset xmlSetGenericErrorFunc after use
    
    ...otherwise, unrelated libxml2 clients that try to report errors during exit
    can fail if this function is still set but the infrastructure behind it is
    already gone.
    
    Change-Id: I7c41fb6770dbff27a71b4b0f82330c608e6e8363

diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index b97b491..c9d7e64 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -391,6 +391,7 @@ namespace XPath
         xmlChar *xStr = (xmlChar*)o1.getStr();
         ::boost::shared_ptr<xmlXPathObject> const xpathObj(
                 xmlXPathEval(xStr, xpathCtx.get()), xmlXPathFreeObject);
+        xmlSetGenericErrorFunc(NULL, NULL);
         if (0 == xpathObj) {
             // OSL_ENSURE(xpathCtx->lastError == NULL, xpathCtx->lastError->message);
             throw XPathException();


More information about the Libreoffice-commits mailing list