From 20c0dfbb473e1f97423bdd946f43acf4a01e4bbd Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 11 Dec 2014 23:23:11 +0100 Subject: [PATCH] fix null-pointer crash (EMAIL order without arguments) --- src/laws.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/laws.c b/src/laws.c index 6420ab366..ea7423670 100755 --- a/src/laws.c +++ b/src/laws.c @@ -2141,7 +2141,7 @@ int email_cmd(unit * u, struct order *ord) init_order(ord); s = getstrtoken(); - if (!s[0]) { + if (!s || !s[0]) { cmistake(u, ord, 85, MSG_EVENT); } else {