From b506bed4d9e441f724a75cfdbd5aa4b8583bd07c Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 14 Dec 2014 12:56:36 +0100 Subject: [PATCH] fix a crash in the parser for USE orders when no item name was given. --- src/laws.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/laws.c b/src/laws.c index 6010d0e33..2d04606dd 100755 --- a/src/laws.c +++ b/src/laws.c @@ -3796,7 +3796,7 @@ int use_cmd(unit * u, struct order *ord) /* BENUTZE 42 Yanxspirit */ t = getstrtoken(); } - itype = finditemtype(t, u->faction->locale); + itype = t ? finditemtype(t, u->faction->locale) : NULL; if (itype != NULL) { err = use_item(u, itype, n, ord);