forked from github/server
fix null-pointer access (familiar spells)
This commit is contained in:
parent
ae920edab0
commit
205cd6f491
|
@ -2581,7 +2581,7 @@ static castorder *cast_cmd(unit * u, order * ord)
|
||||||
skill = limit;
|
skill = limit;
|
||||||
}
|
}
|
||||||
sp = unit_getspell(mage, s, mage->faction->locale);
|
sp = unit_getspell(mage, s, mage->faction->locale);
|
||||||
if (sp->sptyp & NOTFAMILIARCAST) {
|
if (sp == NULL || sp->sptyp & NOTFAMILIARCAST) {
|
||||||
/* Fehler: "Diesen Spruch kann der Vertraute nicht zaubern" */
|
/* Fehler: "Diesen Spruch kann der Vertraute nicht zaubern" */
|
||||||
cmistake(u, ord, 177, MSG_MAGIC);
|
cmistake(u, ord, 177, MSG_MAGIC);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue