forked from github/server
CID 22509: Dereference null return value (NULL_RETURNS)
potential problems at the edge of the map.
This commit is contained in:
parent
8f7f182c91
commit
e7ca5345d7
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue