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,9 +117,11 @@ void walk_connections(region *r, void(*cb)(connection *, void *), void *data) {
|
||||||
walk_i(r, borders[key], cb, data);
|
walk_i(r, borders[key], cb, data);
|
||||||
for (d = 0; d != MAXDIRECTIONS; ++d) {
|
for (d = 0; d != MAXDIRECTIONS; ++d) {
|
||||||
region *rn = r_connect(r, d);
|
region *rn = r_connect(r, d);
|
||||||
int k = reg_hashkey(rn);
|
if (rn) {
|
||||||
if (k < key) {
|
int k = reg_hashkey(rn);
|
||||||
walk_i(r, borders[k], cb, data);
|
if (k < key) {
|
||||||
|
walk_i(r, borders[k], cb, data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue