Commit 086c1b1b authored by Markus Mayer's avatar Markus Mayer
Browse files

fixed NullReferenceException when _styles is not set

parent d15e5419
...@@ -77,7 +77,7 @@ namespace Svg ...@@ -77,7 +77,7 @@ namespace Svg
{ {
SortedDictionary<int, string> rules; SortedDictionary<int, string> rules;
return (this.Attributes.ContainsKey(name) || this.CustomAttributes.ContainsKey(name) || return (this.Attributes.ContainsKey(name) || this.CustomAttributes.ContainsKey(name) ||
(_styles.TryGetValue(name, out rules) && (rules.ContainsKey(StyleSpecificity_InlineStyle) || rules.ContainsKey(StyleSpecificity_PresAttribute)))); (_styles != null && _styles.TryGetValue(name, out rules)) && (rules.ContainsKey(StyleSpecificity_InlineStyle) || rules.ContainsKey(StyleSpecificity_PresAttribute)));
} }
public bool TryGetAttribute(string name, out string value) public bool TryGetAttribute(string name, out string value)
{ {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment