forked from github/server
CID 26257: Null pointer dereferences (NULL_RETURNS)
this test should never fire, but it shuts up coverity
This commit is contained in:
parent
9d9994811a
commit
833a1e70be
|
@ -622,11 +622,13 @@ int sp_mindblast(struct castorder * co)
|
|||
skill_t sk = random_skill(du, false);
|
||||
if (sk != NOSKILL) {
|
||||
skill *sv = unit_skill(du, sk);
|
||||
if (sv) {
|
||||
int n = 1 + rng_int() % 3;
|
||||
|
||||
reduce_skill(du, sv, n);
|
||||
k += du->number;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* unit has no skill. kill it. */
|
||||
kill_troop(dt);
|
||||
|
|
Loading…
Reference in New Issue