From: Stefan F. <ste...@us...> - 2012-06-14 15:57:06
|
rails/game/ReportBuffer.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 1686fd33004bbef7c25eeabab96e649f8d1849f8 Author: Stefan Frey <ste...@we...> Date: Thu Jun 14 17:56:46 2012 +0200 fixed error if a comment is added at the start of the game. Reported by Are-Harald Brenne diff --git a/rails/game/ReportBuffer.java b/rails/game/ReportBuffer.java index fa3074e..e95eebf 100644 --- a/rails/game/ReportBuffer.java +++ b/rails/game/ReportBuffer.java @@ -326,7 +326,12 @@ public final class ReportBuffer { // comments first if (comment != null) { s.append("<span style='color:green;font-size:80%;font-style:italic;'>"); - s.append(item.player.getName() + " says: ' "); + // at gamestart no player is defined, this is a bug-fix + if (item.player == null) { + s.append("'"); + } else { + s.append(item.player.getName() + " says: '"); + } s.append(comment + "'" + NEWLINE_STRING); s.append("</span>"); } |