throw an error when the scenario has no id...
...(weird things will happen otherwise..)
This commit is contained in:
parent
8c25099e3e
commit
69d46078da
1 changed files with 3 additions and 0 deletions
|
@ -1027,6 +1027,9 @@ connect::connect(game_display& disp, const config& game_config,
|
|||
if(get_result() == QUIT
|
||||
|| get_result() == CREATE)
|
||||
return;
|
||||
if (level_["id"].empty()) {
|
||||
throw config::error(_("The scenario is invalid because it has no id."));
|
||||
}
|
||||
lists_init();
|
||||
if(sides_.empty()) {
|
||||
throw config::error(_("The scenario is invalid because it has no sides."));
|
||||
|
|
Loading…
Add table
Reference in a new issue