Reporter | Jura Gorohovsky (gorohoroh) |
---|---|
Created | Feb 12, 2012 11:31:51 PM |
Updated | Feb 13, 2012 8:25:34 PM |
Priority | Normal |
Type | Bug |
Fix versions | Mirabile Futurum |
State | Submitted |
Assignee | Evgeny Pasynkov (pasynkov) |
Subsystem | No subsystem |
Affected versions | No Affected versions |
Fixed in build | No Fixed in build |
See sample project attached to RSRP-288263
In the OnFunkyButtonClick click event in MainWindow.xaml.cs there is a LINQ-to-XML query:
ReSharper says that there is a possible null reference exception in line && n.Attribute("name").Value == "id" - but I check exactly this one line earlier.
In the OnFunkyButtonClick click event in MainWindow.xaml.cs there is a LINQ-to-XML query:
var tagNodes = from n in tagsXml.Elements("list").Elements("object").Elements("string") let tagId = n.Value let tagName = tagId where n.Attribute("name") != null && n.Attribute("name").Value == "id" && !String.IsNullOrEmpty(tagName) select new KeyValuePair<string, string>(tagId, tagName);
ReSharper says that there is a possible null reference exception in line && n.Attribute("name").Value == "id" - but I check exactly this one line earlier.