diff --git a/src/Yavsc/Helpers/AsciiDocHelpers.cs b/src/Yavsc/Helpers/AsciiDocHelpers.cs index 133942f1..a641960e 100644 --- a/src/Yavsc/Helpers/AsciiDocHelpers.cs +++ b/src/Yavsc/Helpers/AsciiDocHelpers.cs @@ -90,11 +90,11 @@ namespace Yavsc.Helpers case "AsciiDocNet.TextLiteral": var tl = elt as TextLiteral; - if (tl.Attributes.Anchor!=null) + if (tl?.Attributes.Anchor!=null) { sb.AppendFormat("{1} ", tl.Attributes.Anchor.Id, tl.Attributes.Anchor.XRefLabel); } - sb.Append(tl.Text); + if (tl!=null) sb.Append(tl.Text); break; case "AsciiDocNet.Emphasis": diff --git a/src/Yavsc/Yavsc.csproj b/src/Yavsc/Yavsc.csproj index 86cfe39f..698fa771 100644 --- a/src/Yavsc/Yavsc.csproj +++ b/src/Yavsc/Yavsc.csproj @@ -42,7 +42,7 @@ - +