]> git.sesse.net Git - ccbs/blobdiff - html/show-tournament.pl
Don't give 500 if we have no rounds.
[ccbs] / html / show-tournament.pl
index d69dc3219989f35a425eb4df2a4d52100335dbc6..8b23f08d8cae498dc649c887f1aa379dd4b6a221 100755 (executable)
@@ -157,7 +157,9 @@ if ($num_rounds == 0) {
 if ($num_rankings > 0) {
        $closing_valid = 0;
        $finishing_valid = 0;
-       $rounds[$#rounds]->{'locked'} = 1;
+       if ($#rounds > -1) {
+               $rounds[$#rounds]->{'locked'} = 1;
+       }
 }
 
 ccbs::print_header();