handle regions that have no owner

This commit is contained in:
Enno Rehling 2016-02-16 09:28:10 +01:00
parent 7fe07439f5
commit c823a3b036
1 changed files with 2 additions and 1 deletions

View File

@ -58,7 +58,8 @@ attrib_type at_otherfaction = {
struct faction *get_otherfaction(const struct attrib *a)
{
return (faction *)(a->data.v);
faction * f = (faction *)(a->data.v);
return (f && f->_alive) ? f : NULL;
}
struct attrib *make_otherfaction(struct faction *f)