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)
|
static region *lastregion(faction * f)
|
||||||
{
|
{
|
||||||
#ifdef SMART_INTERVALS
|
#ifdef SMART_INTERVALS
|
||||||
return f->last->next;
|
return f->last ? f->last->next : NULL;
|
||||||
#else
|
#else
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue