From e3e3b03d9aa300c15964a4b5700a0a5708d01acd Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 20 Apr 2002 20:08:00 +0000 Subject: [PATCH] =?UTF-8?q?=C3=84nderungen=20f=C3=BCr=20das=20tutorial,=20?= =?UTF-8?q?crashbug=20im=20mapper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mapper/map_units.c | 20 +++++++++++--------- src/res/tutorial.xml | 4 ++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/mapper/map_units.c b/src/mapper/map_units.c index 4d0b1a534..b6e796a29 100644 --- a/src/mapper/map_units.c +++ b/src/mapper/map_units.c @@ -1241,15 +1241,17 @@ showunits(region * r) break; case '\023': sh = findship(f); - sprintf(lbuf, "Einheit auf%s als Eigner?", shipname(sh)); - if (yes_no(0, lbuf, 'j')) { - for (x = r->units; x; x = x->next) - if (x->ship == sh && fval(x, FL_OWNER)) { - freset(x, FL_OWNER); - break; - } - u->ship = sh; - fset(u, FL_OWNER); + if (sh) { + sprintf(lbuf, "Einheit auf%s als Eigner?", shipname(sh)); + if (yes_no(0, lbuf, 'j')) { + for (x = r->units; x; x = x->next) + if (x->ship == sh && fval(x, FL_OWNER)) { + freset(x, FL_OWNER); + break; + } + u->ship = sh; + fset(u, FL_OWNER); + } } break; case '\025': diff --git a/src/res/tutorial.xml b/src/res/tutorial.xml index ac50f83d0..285518a4c 100644 --- a/src/res/tutorial.xml +++ b/src/res/tutorial.xml @@ -12,10 +12,10 @@ - + Game specific - +