(planerepair): Move the carrier sanity to before the carrier variable is
used.
This commit is contained in:
parent
94af801449
commit
6ddbc9f950
1 changed files with 3 additions and 1 deletions
|
@ -145,9 +145,11 @@ planerepair(struct plnstr *pp, struct natstr *np, int *bp, int etus)
|
||||||
if (pp->pln_effic >= 80)
|
if (pp->pln_effic >= 80)
|
||||||
return;
|
return;
|
||||||
carrier = getshipp(pp->pln_ship);
|
carrier = getshipp(pp->pln_ship);
|
||||||
|
if (CANT_HAPPEN(!carrier))
|
||||||
|
return;
|
||||||
if (carrier->shp_off)
|
if (carrier->shp_off)
|
||||||
return;
|
return;
|
||||||
if (CANT_HAPPEN(!carrier || carrier->shp_own != pp->pln_own))
|
if (CANT_HAPPEN(carrier->shp_own != pp->pln_own))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue