diff --git a/admin/judges_sa.php b/admin/judges_sa.php index d6f148d..3647f9a 100644 --- a/admin/judges_sa.php +++ b/admin/judges_sa.php @@ -519,6 +519,12 @@ foreach($judges as &$j) { TRACE("Loaded ".count($judges)." judges\n"); $jteam[0]['max_judges'] = count($judges); +if(count($judges)==0) { + echo "No judges available. Aborting!\n"; + set_status("Error - no judges available..."); + set_percent(0); + exit; +} /* Load the numbers for any user-defined judge teams that already exist, * these numbers will be off-limits for auto-assigning numbers */