jamietre / CsQuery

CsQuery is a complete CSS selector engine, HTML parser, and jQuery port for C# and .NET 4.
Other
1.15k stars 249 forks source link

.Render() Method - Object reference not set to an instance of an object #169

Open wjchristenson2 opened 9 years ago

wjchristenson2 commented 9 years ago

CsQuery 1.3.5-beta5 (Prerelease)

I think I may have found another occasional error with the .Render() method. I created a CsQuery objects off HTML and when I do a .Render(), occasionally I get the following error:

Details: System.NullReferenceException: Object reference not set to an instance of an object. at CsQuery.Implementation.AttributeCollection.d0.MoveNext() at CsQuery.Implementation.DomElement.d38.MoveNext() at CsQuery.Output.FormatDefault.RenderElementInternal(IDomObject element, TextWriter writer, Boolean includeChildren) at CsQuery.Output.FormatDefault.RenderStack(TextWriter writer) at CsQuery.Output.FormatDefault.Render(IDomObject node)