提交 f37e86ff 编写于 作者: R Rolf Bjarne Kvinge

[mono-api-html] Print string fields with no (or null) value without an NRE.

上级 436328d9
......@@ -71,8 +71,12 @@ namespace Xamarin.ApiDiff {
string ftype = e.GetTypeName ("fieldtype");
sb.Append (ftype).Append (' ');
sb.Append (name);
if (ftype == "string")
sb.Append (" = \"").Append (e.Attribute ("value").Value).Append ('"');
if (ftype == "string" && e.Attribute ("value") != null) {
if (value == null)
sb.Append (" = null");
else
sb.Append (" = \"").Append (value).Append ('"');
}
sb.Append (';');
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册