diff options
-rw-r--r-- | svgio/source/svgreader/svgsvgnode.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx index 50dbef752131..73a5efbdda9e 100644 --- a/svgio/source/svgreader/svgsvgnode.cxx +++ b/svgio/source/svgreader/svgsvgnode.cxx @@ -58,8 +58,13 @@ namespace svgio const SvgStyleAttributes* SvgSvgNode::getSvgStyleAttributes() const { - checkForCssStyle(OUString("svg"), maSvgStyleAttributes); - return maSvgStyleAttributes.getCssStyleParent(); + const SvgStyleAttributes* aCheckCssStyle = checkForCssStyle(OUString("svg"), maSvgStyleAttributes); + const SvgStyleAttributes* aGetCssStyleParent = maSvgStyleAttributes.getCssStyleParent(); + + if (aGetCssStyleParent == NULL) + return aCheckCssStyle; + + return aGetCssStyleParent; } void SvgSvgNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent) |