summaryrefslogtreecommitdiffstats
path: root/svgio/source/svgreader/svgnode.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svgio/source/svgreader/svgnode.cxx')
-rw-r--r--svgio/source/svgreader/svgnode.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx
index f6395a24527d..56389ef14124 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -267,6 +267,7 @@ namespace svgio
maDisplay(Display_inline),
maCssStyleVector(),
mpLocalCssStyle(nullptr),
+ mbDecomposing(false),
mbCssStyleVectorBuilt(false)
{
OSL_ENSURE(SVGTokenUnknown != maType, "SvgNode with unknown type created (!)");
@@ -464,6 +465,9 @@ namespace svgio
void SvgNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const
{
+ if (mbDecomposing) //guard against infinite recurse
+ return;
+
if(Display_none == getDisplay())
{
return;
@@ -499,6 +503,8 @@ namespace svgio
if(!rChildren.empty())
{
+ mbDecomposing = true;
+
const sal_uInt32 nCount(rChildren.size());
for(sal_uInt32 a(0); a < nCount; a++)
@@ -571,6 +577,7 @@ namespace svgio
}
}
}
+ mbDecomposing = false;
}
}