forked from github/server
kingdoms: null-pointer crash if potion type does not exist
This commit is contained in:
parent
49cd3e08ad
commit
aa4fda7e26
|
@ -1301,12 +1301,14 @@ init_oldpotions(void)
|
|||
|
||||
for (p=0;p!=MAXPOTIONS;++p) {
|
||||
item_type * itype = it_find(potionnames[p]);
|
||||
if (itype!=NULL) {
|
||||
if (potiontext[p]) {
|
||||
locale_setstring(default_locale, mkname("potion", potionnames[p]), potiontext[p]);
|
||||
}
|
||||
oldpotiontype[p] = itype->rtype->ptype;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource_type * r_silver;
|
||||
resource_type * r_aura;
|
||||
|
|
Loading…
Reference in New Issue