forked from github/server
NULL-pointer in sp_destroy_curse
This commit is contained in:
parent
d7c3ffa0cc
commit
b5a119c47b
|
@ -7106,8 +7106,7 @@ sp_destroy_curse(castorder *co)
|
|||
add_message(&mage->faction->msgs, new_message(mage->faction,
|
||||
"spelltargetnotfound%u:unit%r:region%s:command",
|
||||
mage, mage->region, strdup(co->order)));
|
||||
}
|
||||
|
||||
} else {
|
||||
switch(obj){
|
||||
case SPP_REGION:
|
||||
ap = &r->attribs;
|
||||
|
@ -7144,7 +7143,8 @@ sp_destroy_curse(castorder *co)
|
|||
/* überprüfung, ob curse zu diesem objekt gehört */
|
||||
if (!is_cursed_with(*ap, c)){
|
||||
/* 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",
|
||||
mage, mage->region, strdup(co->order)));
|
||||
}
|
||||
|
@ -7165,7 +7165,7 @@ sp_destroy_curse(castorder *co)
|
|||
"destroy_magic_noeffect%u:unit%r:region%s:command",
|
||||
mage, mage->region, strdup(co->order)));
|
||||
}
|
||||
|
||||
}
|
||||
if(ts != NULL) free(ts);
|
||||
|
||||
return cast_level;
|
||||
|
|
Loading…
Reference in New Issue