CID 26258: (NULL_RETURNS)

deal with bad connection data, static analysis doen't knwo that we never have that.
This commit is contained in:
Enno Rehling 2015-10-29 16:38:29 +01:00
parent b7dce8071c
commit 9d9994811a
1 changed files with 1 additions and 1 deletions

View File

@ -2379,7 +2379,7 @@ static int follow_ship(unit * u, order * ord)
speed = maxspeed;
}
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]);
bufp = STRLCPY_EX(bufp, " ", &size, "hunt");
bufp = STRLCPY_EX(bufp, loc, &size, "hunt");