NULL-pointer in sp_destroy_curse

This commit is contained in:
Enno Rehling 2003-01-26 08:55:47 +00:00
parent d7c3ffa0cc
commit b5a119c47b
1 changed files with 31 additions and 31 deletions

View File

@ -7106,8 +7106,7 @@ sp_destroy_curse(castorder *co)
add_message(&mage->faction->msgs, new_message(mage->faction, add_message(&mage->faction->msgs, new_message(mage->faction,
"spelltargetnotfound%u:unit%r:region%s:command", "spelltargetnotfound%u:unit%r:region%s:command",
mage, mage->region, strdup(co->order))); mage, mage->region, strdup(co->order)));
} } else {
switch(obj){ switch(obj){
case SPP_REGION: case SPP_REGION:
ap = &r->attribs; ap = &r->attribs;
@ -7144,7 +7143,8 @@ sp_destroy_curse(castorder *co)
/* überprüfung, ob curse zu diesem objekt gehört */ /* überprüfung, ob curse zu diesem objekt gehört */
if (!is_cursed_with(*ap, c)){ if (!is_cursed_with(*ap, c)){
/* Es wurde kein Ziel gefunden */ /* Es wurde kein Ziel gefunden */
add_message(&mage->faction->msgs, new_message(mage->faction, add_message(&mage->faction->msgs,
new_message(mage->faction,
"spelltargetnotfound%u:unit%r:region%s:command", "spelltargetnotfound%u:unit%r:region%s:command",
mage, mage->region, strdup(co->order))); mage, mage->region, strdup(co->order)));
} }
@ -7165,7 +7165,7 @@ sp_destroy_curse(castorder *co)
"destroy_magic_noeffect%u:unit%r:region%s:command", "destroy_magic_noeffect%u:unit%r:region%s:command",
mage, mage->region, strdup(co->order))); mage, mage->region, strdup(co->order)));
} }
}
if(ts != NULL) free(ts); if(ts != NULL) free(ts);
return cast_level; return cast_level;