[Libreoffice-commits] core.git: filter/source

Takeshi Abe tabe at fixedpoint.jp
Fri Apr 28 21:00:25 UTC 2017


 filter/source/svg/svgreader.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 843f633c842f8540c42613cea78c5f66b262051a
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Fri Apr 28 21:10:30 2017 +0900

    tdf#107142 Fix crash when opening SVG with <use>
    
    which is a regression from 62283fed204e05e3f30a8ae703762d7f96c4e88a.
    
    Note that css::xml::dom::XNode::hasAttributes() is meaningful
    only when it is an element.
    
    Change-Id: Ib0a8b467012e9cb42a4b018967fb2740bcd10c5c
    Reviewed-on: https://gerrit.libreoffice.org/37070
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index fd4a58c52735..0546eea3132e 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -192,7 +192,7 @@ struct AnnotatingVisitor
     bool IsAncestorId(const uno::Reference<xml::dom::XNode>& xParentNode, const OUString& rValue)
     {
         bool bSelfCycle = false;
-        if (xParentNode.is())
+        if (xParentNode.is() && xParentNode->getNodeType() == xml::dom::NodeType_ELEMENT_NODE)
         {
             if (xParentNode->hasAttributes())
             {


More information about the Libreoffice-commits mailing list