diff options
author | Joren De Cuyper <jorendc@libreoffice.org> | 2014-07-15 13:52:10 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2014-07-15 14:28:29 +0000 |
commit | 2dbd2cb9a55c90f4f3db3a781526cc2246d0bdd7 (patch) | |
tree | 2aea05301e9c0d5c168febd5994aee2960a49949 /svgio/source | |
parent | f634ec520fa9e8c3e7b1f0660c7a6561bdff2aaa (diff) |
Avoid infinite loop when gathering "g" element styles
Same way of how fdo#74743 is fixed 3b7472b284131c09d91b69f26d5d26d54648f939
Change-Id: If6cc8eb6ff89b0081f27ff75a9b60a3e81cff1bd
Reviewed-on: https://gerrit.libreoffice.org/10326
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svgio/source')
-rw-r--r-- | svgio/source/svgreader/svggnode.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/svgio/source/svgreader/svggnode.cxx b/svgio/source/svgreader/svggnode.cxx index 82d3d5d124f2..45fa6a31ec53 100644 --- a/svgio/source/svgreader/svggnode.cxx +++ b/svgio/source/svgreader/svggnode.cxx @@ -43,7 +43,13 @@ namespace svgio const SvgStyleAttributes* SvgGNode::getSvgStyleAttributes() const { - return checkForCssStyle(OUString("g"), maSvgStyleAttributes); + const SvgStyleAttributes* aCheckCssStyle = checkForCssStyle(OUString("g"), maSvgStyleAttributes); + const SvgStyleAttributes* aGetCssStyleParent = maSvgStyleAttributes.getCssStyleParent(); + + if (aGetCssStyleParent == NULL) + return aCheckCssStyle; + + return aGetCssStyleParent; } void SvgGNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) |