22485 Dereference after null check

This commit is contained in:
Enno Rehling 2015-11-05 08:35:03 +01:00
parent b81e56d306
commit c68829029b
1 changed files with 2 additions and 2 deletions

View File

@ -2192,8 +2192,8 @@ static void travel(unit * u, region_list ** routep)
region_list *route_begin = NULL; region_list *route_begin = NULL;
follower *followers = NULL; follower *followers = NULL;
if (routep) assert(routep);
*routep = NULL; *routep = NULL;
/* a few pre-checks that need not be done for each step: */ /* a few pre-checks that need not be done for each step: */
if (!fval(r->terrain, SEA_REGION)) { if (!fval(r->terrain, SEA_REGION)) {