diff options
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/source/svgreader/svgstyleattributes.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index cc9d40cfb16e..9c247532125b 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -203,15 +203,16 @@ namespace svgio const SvgStyleAttributes* SvgStyleAttributes::getParentStyle() const { - const SvgStyleAttributes* pParentStyle = getCssStyleParent(); + if(getCssStyleParent()) + { + return getCssStyleParent(); + } - if(mrOwner.supportsParentStyle() && mrOwner.getParent()) + if(mrOwner.getParent()) { return mrOwner.getParent()->getSvgStyleAttributes(); } - if (pParentStyle != this) // to prevent infinite loop - return pParentStyle; return NULL; } |