fix null-pointer crash (EMAIL order without arguments)

This commit is contained in:
Enno Rehling 2014-12-11 23:23:11 +01:00
parent aa01d9f21a
commit 20c0dfbb47
1 changed files with 1 additions and 1 deletions

View File

@ -2141,7 +2141,7 @@ int email_cmd(unit * u, struct order *ord)
init_order(ord); init_order(ord);
s = getstrtoken(); s = getstrtoken();
if (!s[0]) { if (!s || !s[0]) {
cmistake(u, ord, 85, MSG_EVENT); cmistake(u, ord, 85, MSG_EVENT);
} }
else { else {