fix nul-pointer access

This commit is contained in:
Enno Rehling 2016-09-13 21:13:26 +02:00
parent cd71a21bf5
commit 8ec37783e2
1 changed files with 1 additions and 1 deletions

View File

@ -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