re-apply fix for CID 22551: dereference before null check (merge conflict)

This commit is contained in:
Enno Rehling 2015-11-04 09:36:09 +01:00
parent 0be8724093
commit dedbd67d07
1 changed files with 5 additions and 3 deletions

View File

@ -154,10 +154,12 @@ static curse *shipcurse_flyingship(ship * sh, unit * mage, double power, int dur
/* mit C_SHIP_NODRIFT haben wir kein Problem */
curse *c =
create_curse(mage, &sh->attribs, ct_flyingship, power, duration, 0.0, 0);
if (c) {
c->data.v = sh;
if (c && c->duration > 0) {
if (c->duration > 0) {
sh->flags |= SF_FLYING;
}
}
return c;
}
}