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,9 +154,11 @@ 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);
|
||||||
c->data.v = sh;
|
if (c) {
|
||||||
if (c && c->duration > 0) {
|
c->data.v = sh;
|
||||||
sh->flags |= SF_FLYING;
|
if (c->duration > 0) {
|
||||||
|
sh->flags |= SF_FLYING;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue