forked from github/server
fail when there are borders that can't be read because their endpoints are missing
This commit is contained in:
parent
abd6600cfe
commit
e5f5dc6aa4
2 changed files with 4 additions and 2 deletions
|
@ -21,3 +21,5 @@ for k,v in ipairs(ids) do
|
||||||
p:erase()
|
p:erase()
|
||||||
end
|
end
|
||||||
eressea.write_game(get_turn() .. '.new')
|
eressea.write_game(get_turn() .. '.new')
|
||||||
|
eressea.free_game()
|
||||||
|
eressea.read_game(get_turn() .. '.new')
|
||||||
|
|
|
@ -633,8 +633,8 @@ int read_borders(gamedata *data)
|
||||||
from = findregionbyid(fid);
|
from = findregionbyid(fid);
|
||||||
to = findregionbyid(tid);
|
to = findregionbyid(tid);
|
||||||
if (!to || !from) {
|
if (!to || !from) {
|
||||||
log_warning("%s connection between incomplete regions %d and %d", zText, fid, tid);
|
log_error("%s connection between missing regions %d and %d", zText, fid, tid);
|
||||||
continue;
|
assert((to && from) || !"connection between missing regions");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue