forked from github/server
re-apply fix for CID 22551: dereference before null check (merge conflict)
This commit is contained in:
parent
0be8724093
commit
dedbd67d07
|
@ -154,10 +154,12 @@ static curse *shipcurse_flyingship(ship * sh, unit * mage, double power, int dur
|
||||||
/* mit C_SHIP_NODRIFT haben wir kein Problem */
|
/* mit C_SHIP_NODRIFT haben wir kein Problem */
|
||||||
curse *c =
|
curse *c =
|
||||||
create_curse(mage, &sh->attribs, ct_flyingship, power, duration, 0.0, 0);
|
create_curse(mage, &sh->attribs, ct_flyingship, power, duration, 0.0, 0);
|
||||||
|
if (c) {
|
||||||
c->data.v = sh;
|
c->data.v = sh;
|
||||||
if (c && c->duration > 0) {
|
if (c->duration > 0) {
|
||||||
sh->flags |= SF_FLYING;
|
sh->flags |= SF_FLYING;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue