diff --git a/src/lib/subs/lndsub.c b/src/lib/subs/lndsub.c index b3483b79..30630a70 100644 --- a/src/lib/subs/lndsub.c +++ b/src/lib/subs/lndsub.c @@ -412,7 +412,7 @@ lnd_sel(struct nstr_item *ni, struct emp_qelem *list) * but much of the code assumes that only the land unit's * owner can march it. */ - if (land.lnd_own != player->cnum) + if (!land.lnd_own || land.lnd_own != player->cnum) continue; if (opt_MARKET) { if (ontradingblock(EF_LAND, &land)) { diff --git a/src/lib/subs/plnsub.c b/src/lib/subs/plnsub.c index c0e0816e..a167f636 100644 --- a/src/lib/subs/plnsub.c +++ b/src/lib/subs/plnsub.c @@ -538,7 +538,7 @@ pln_sel(struct nstr_item *ni, struct emp_qelem *list, struct sctstr *ap, * much of the code assumes that only the plane's owner can * fly it. */ - if (plane.pln_own != player->cnum) + if (!plane.pln_own || plane.pln_own != player->cnum) continue; if (plane.pln_mobil <= 0) continue; diff --git a/src/lib/subs/shpsub.c b/src/lib/subs/shpsub.c index 05d2112d..3a45c725 100644 --- a/src/lib/subs/shpsub.c +++ b/src/lib/subs/shpsub.c @@ -70,7 +70,7 @@ shp_sel(struct nstr_item *ni, struct emp_qelem *list) * much of the code assumes that only the ship's owner can * navigate it. */ - if (ship.shp_own != player->cnum) + if (!ship.shp_own || ship.shp_own != player->cnum) continue; mcp = &mchr[(int)ship.shp_type]; if (opt_MARKET) {