From f87d9b533576352e80ec4c6c41dd7f76e6f4dec5 Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Baaskaran Date: Mon, 7 Jan 2019 20:18:39 -0800 Subject: [PATCH] Fix null ref in the parser (dotnet/aspnetcore-tooling#103) \n\nCommit migrated from https://github.com/dotnet/aspnetcore-tooling/commit/8e1629b60b26c438b7bfbbf0e654a4bf15141788 --- .../src/Legacy/HtmlMarkupParser.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/HtmlMarkupParser.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/HtmlMarkupParser.cs index ed20cc9617..60bca288c6 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/HtmlMarkupParser.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/HtmlMarkupParser.cs @@ -1591,6 +1591,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy var node = tagBlock.Attributes[i]; if (node is MarkupAttributeBlockSyntax attributeBlock && + attributeBlock.Value != null && attributeBlock.Value.Children.Count > 0 && IsTypeAttribute(attributeBlock)) {