Fix crash on certain kinds of corrupted teams

This commit is contained in:
Guangcong Luo
2014-09-26 23:38:25 -05:00
parent e7fad47f54
commit a0d7a347d7

View File

@@ -147,6 +147,17 @@
var team = teams[i];
if (team && !team.team) {
team = null;
}
if (team) {
for (var j=0; j<team.team.length; j++) {
if (!team.team[j]) {
team = null;
break;
}
}
}
if (!team) {
buf += '<li>Error: A corrupted team was dropped</li>';
teams.splice(i,1);