forked from github/server
fix nul-pointer access
This commit is contained in:
parent
cd71a21bf5
commit
8ec37783e2
1 changed files with 1 additions and 1 deletions
|
@ -1356,7 +1356,7 @@ void reorder_units(region * r)
|
|||
static region *lastregion(faction * f)
|
||||
{
|
||||
#ifdef SMART_INTERVALS
|
||||
return f->last->next;
|
||||
return f->last ? f->last->next : NULL;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue