]> git.pond.sub.org Git - empserver/commitdiff
(planerepair): Move the carrier sanity to before the carrier variable is
authorRon Koenderink <rkoenderink@yahoo.ca>
Thu, 28 Dec 2006 17:44:03 +0000 (17:44 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Thu, 28 Dec 2006 17:44:03 +0000 (17:44 +0000)
used.

src/lib/update/plane.c

index c588ba55231b568888f91331806e2d20adb2dc94..42b7e7210116106557be550e4338696f4f6f1572 100644 (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;
     }