html: don't crash on empty notes list

This commit is contained in:
Hylke Bons 2011-06-26 16:00:33 +01:00
parent dca0706fc5
commit 33930ccdcc

View file

@ -400,6 +400,7 @@ namespace SparkleShare {
if (change_set.SupportsNotes) {
comments = "<table class=\"comments\">";
if (change_set.Notes != null) {
change_set.Notes.Sort ((x, y) => (x.Timestamp.CompareTo (y.Timestamp)));
foreach (SparkleNote note in change_set.Notes) {
@ -411,6 +412,7 @@ namespace SparkleShare {
" <td class=\"comment-text\" colspan=\"2\">" + note.Body + "</td>" +
"</tr>";
}
}
comments += "</table>";
}