CID 22484 Explicit null dereferenced

github issue #386
This commit is contained in:
Enno Rehling 2015-11-11 15:41:08 +01:00
parent 3cd47bb8fa
commit fc73da4ae4
1 changed files with 26 additions and 25 deletions

View File

@ -2189,7 +2189,7 @@ static const region_list *travel_i(unit * u, const region_list * route_begin,
static void travel(unit * u, region_list ** routep)
{
region *r = u->region;
region_list *route_begin = NULL;
region_list *route_begin;
follower *followers = NULL;
assert(routep);
@ -2232,6 +2232,7 @@ static void travel(unit * u, region_list ** routep)
make_route(u, u->thisorder, routep);
route_begin = *routep;
if (route_begin) {
/* und ab die post: */
travel_i(u, route_begin, NULL, u->thisorder, TRAVEL_NORMAL, &followers);
@ -2261,7 +2262,7 @@ static void travel(unit * u, region_list ** routep)
free_order(follow_order);
}
}
}
}
void move_cmd(unit * u, bool move_on_land)