forked from github/server
co is now first checked for validity before it is used for var-initialisation
This commit is contained in:
parent
43b2e30c46
commit
6f3ea9b85a
1 changed files with 12 additions and 5 deletions
|
@ -37,14 +37,21 @@ int sp_flying_ship(castorder * co)
|
|||
{
|
||||
ship *sh;
|
||||
unit *u;
|
||||
region *r = co_get_region(co);
|
||||
unit *mage = co->magician.u;
|
||||
int cast_level = co->level;
|
||||
double power = co->force;
|
||||
spellparameter *pa = co->par;
|
||||
region *r;
|
||||
unit *mage;
|
||||
int cast_level;
|
||||
double power;
|
||||
spellparameter *pa;
|
||||
message *m = NULL;
|
||||
int cno;
|
||||
|
||||
assert(co);
|
||||
r = co_get_region(co);
|
||||
mage = co->magician.u;
|
||||
cast_level = co->level;
|
||||
power = co->force;
|
||||
pa = co->par;
|
||||
|
||||
/* wenn kein Ziel gefunden, Zauber abbrechen */
|
||||
if (pa->param[0]->flag == TARGET_NOTFOUND)
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue