From 8d5ee9c811a601f778862472c97334f6e109bf8d Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 4 Feb 2007 13:25:05 +0000 Subject: [PATCH] crash --- src/common/kernel/magic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/kernel/magic.c b/src/common/kernel/magic.c index 81f0347f9..2daee7ac2 100644 --- a/src/common/kernel/magic.c +++ b/src/common/kernel/magic.c @@ -2410,9 +2410,9 @@ get_clone(const unit *u) unit * get_clone_mage(const unit *u) { - attrib * a = a_find(u->attribs, &at_clonemage); - if (a!=NULL) return (unit*)a->data.v; - return NULL; + attrib * a = a_find(u->attribs, &at_clonemage); + if (a!=NULL) return (unit*)a->data.v; + return NULL; } static boolean @@ -2420,7 +2420,7 @@ is_moving_ship(const region * r, const ship *sh) { const unit *u = shipowner(sh); - switch (get_keyword(u->thisorder)) { + if (u) switch (get_keyword(u->thisorder)) { case K_ROUTE: case K_MOVE: case K_FOLLOW: