diff --git a/src/common/kernel/magic.c b/src/common/kernel/magic.c index edccdeff3..db38f5fc6 100644 --- a/src/common/kernel/magic.c +++ b/src/common/kernel/magic.c @@ -340,8 +340,9 @@ create_mage(unit * u, magic_t mtyp) if (a!=NULL) { mage = a->data.v; assert(mage->spells==NULL && mage->magietyp == mtyp); + } else { + a = a_add(&u->attribs, a_new(&at_mage)); } - a = a_add(&u->attribs, a_new(&at_mage)); mage = a->data.v; mage->magietyp = mtyp;