From 9b49bbd3871001c3916f1453900974fe9b4ebd68 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 29 Dec 2013 00:15:50 +0100 Subject: [PATCH] fix crash in a spell when no astral space is available. --- core/src/gamecode/laws.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/gamecode/laws.c b/core/src/gamecode/laws.c index bd8eb859f..372ab7c77 100755 --- a/core/src/gamecode/laws.c +++ b/core/src/gamecode/laws.c @@ -3297,8 +3297,6 @@ static building *age_building(building * b) region *rt = r_standard_to_astral(r); unit *u, *mage = NULL; - if (fval(rt->terrain, FORBIDDEN_REGION)) - rt = NULL; /* step 1: give unicorns to people in the building, * find out if there's a magician in there. */ for (u = r->units; u; u = u->next) { @@ -3325,7 +3323,7 @@ static building *age_building(building * b) /* if there's a magician, and a connection to astral space, create the * curse. */ - if (rt != NULL && mage != NULL) { + if (rt && !fval(rt->terrain, FORBIDDEN_REGION) && mage != NULL) { curse *c = get_curse(rt->attribs, ct_astralblock); if (c == NULL) { if (mage != NULL) {