fix a crash in the parser for USE orders when no item name was given.

This commit is contained in:
Enno Rehling 2014-12-14 12:56:36 +01:00
parent 3ac407407a
commit b506bed4d9
1 changed files with 1 additions and 1 deletions

View File

@ -3796,7 +3796,7 @@ int use_cmd(unit * u, struct order *ord)
/* BENUTZE 42 Yanxspirit */ /* BENUTZE 42 Yanxspirit */
t = getstrtoken(); t = getstrtoken();
} }
itype = finditemtype(t, u->faction->locale); itype = t ? finditemtype(t, u->faction->locale) : NULL;
if (itype != NULL) { if (itype != NULL) {
err = use_item(u, itype, n, ord); err = use_item(u, itype, n, ord);