diff --git a/src/battle.test.c b/src/battle.test.c index f44d3985c..7228ef90e 100644 --- a/src/battle.test.c +++ b/src/battle.test.c @@ -449,7 +449,7 @@ static void test_battle_skilldiff_building(CuTest *tc) unit *ua, *ud; battle *b = NULL; building_type *btype; - static const curse_type *strongwall_ct, *magicwalls_ct; + const curse_type *strongwall_ct, *magicwalls_ct; test_cleanup(); btype = test_create_buildingtype("castle"); diff --git a/src/kernel/unit.c b/src/kernel/unit.c index 349d2b260..bb519e898 100644 --- a/src/kernel/unit.c +++ b/src/kernel/unit.c @@ -1662,7 +1662,6 @@ int unit_max_hp(const unit * u) { int h; double p; - static const curse_type *heal_ct = NULL; int rule_stamina = config_get_int("rules.stamina", STAMINA_AFFECTS_HP); h = u_race(u)->hitpoints; @@ -1672,9 +1671,8 @@ int unit_max_hp(const unit * u) } /* der healing curse veraendert die maximalen hp */ - if (u->region) { - if (heal_ct == NULL) - heal_ct = ct_find("healingzone"); + if (u->region && u->region->attribs) { + const curse_type *heal_ct = ct_find("healingzone"); if (heal_ct) { curse *c = get_curse(u->region->attribs, heal_ct); if (c) {