forked from github/server
CID 26258: (NULL_RETURNS)
deal with bad connection data, static analysis doen't knwo that we never have that.
This commit is contained in:
parent
b7dce8071c
commit
9d9994811a
|
@ -2379,7 +2379,7 @@ static int follow_ship(unit * u, order * ord)
|
||||||
speed = maxspeed;
|
speed = maxspeed;
|
||||||
}
|
}
|
||||||
rc = rconnect(rc, dir);
|
rc = rconnect(rc, dir);
|
||||||
while (moves < speed && (dir = hunted_dir(rc->attribs, id)) != NODIRECTION) {
|
while (rc && moves < speed && (dir = hunted_dir(rc->attribs, id)) != NODIRECTION) {
|
||||||
const char *loc = LOC(u->faction->locale, directions[dir]);
|
const char *loc = LOC(u->faction->locale, directions[dir]);
|
||||||
bufp = STRLCPY_EX(bufp, " ", &size, "hunt");
|
bufp = STRLCPY_EX(bufp, " ", &size, "hunt");
|
||||||
bufp = STRLCPY_EX(bufp, loc, &size, "hunt");
|
bufp = STRLCPY_EX(bufp, loc, &size, "hunt");
|
||||||
|
|
Loading…
Reference in New Issue