forked from github/server
CID 22486 Dereference after null check
This commit is contained in:
parent
b6190b5193
commit
b81e56d306
1 changed files with 1 additions and 1 deletions
|
@ -1013,7 +1013,7 @@ void transfermen(unit * u, unit * dst, int n)
|
||||||
sn->level = (unsigned char)level;
|
sn->level = (unsigned char)level;
|
||||||
sn->weeks = (unsigned char)weeks;
|
sn->weeks = (unsigned char)weeks;
|
||||||
assert(sn->weeks > 0 && sn->weeks <= sn->level * 2 + 1);
|
assert(sn->weeks > 0 && sn->weeks <= sn->level * 2 + 1);
|
||||||
assert(dst->number != 0 || (sn->level == sv->level
|
assert(dst->number != 0 || (sv && sn->level == sv->level
|
||||||
&& sn->weeks == sv->weeks));
|
&& sn->weeks == sv->weeks));
|
||||||
}
|
}
|
||||||
else if (sn) {
|
else if (sn) {
|
||||||
|
|
Loading…
Reference in a new issue