summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2017-04-28 21:10:30 +0900
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-04-28 22:59:55 +0200
commit843f633c842f8540c42613cea78c5f66b262051a (patch)
tree720f66713cab60431688ab5196d3be18497c8da6
parent8250e1a4a3f103bf37ca09c8dbab0584a5a1c2cf (diff)
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@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--filter/source/svg/svgreader.cxx2
1 files changed, 1 insertions, 1 deletions
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())
{