(planerepair): Move the carrier sanity to before the carrier variable is

used.
This commit is contained in:
Ron Koenderink 2006-12-28 17:44:03 +00:00
parent 94af801449
commit 6ddbc9f950

View file

@ -145,9 +145,11 @@ planerepair(struct plnstr *pp, struct natstr *np, int *bp, int etus)
if (pp->pln_effic >= 80)
return;
carrier = getshipp(pp->pln_ship);
if (CANT_HAPPEN(!carrier))
return;
if (carrier->shp_off)
return;
if (CANT_HAPPEN(!carrier || carrier->shp_own != pp->pln_own))
if (CANT_HAPPEN(carrier->shp_own != pp->pln_own))
return;
}