CID 22509: Dereference null return value (NULL_RETURNS)

potential problems at the edge of the map.
This commit is contained in:
Enno Rehling 2015-10-30 12:57:07 +01:00
parent 8f7f182c91
commit e7ca5345d7
1 changed files with 5 additions and 3 deletions

View File

@ -117,11 +117,13 @@ void walk_connections(region *r, void(*cb)(connection *, void *), void *data) {
walk_i(r, borders[key], cb, data);
for (d = 0; d != MAXDIRECTIONS; ++d) {
region *rn = r_connect(r, d);
if (rn) {
int k = reg_hashkey(rn);
if (k < key) {
walk_i(r, borders[k], cb, data);
}
}
}
}
static connection **get_borders_i(const region * r1, const region * r2)