From 3a1e4ab7f5d84f4713b774834949d3d54d33e0ab Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 13 Dec 2014 18:40:15 +0100 Subject: [PATCH] fix crash when a GIVE order has no arguments. --- src/economy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/economy.c b/src/economy.c index 6938be4c3..60bea437d 100644 --- a/src/economy.c +++ b/src/economy.c @@ -634,7 +634,7 @@ int give_control_cmd(unit * u, order * ord) getunit(r, u->faction, &u2); s = getstrtoken(); - if (isparam(s, u->faction->locale, P_CONTROL)) { + if (s && isparam(s, u->faction->locale, P_CONTROL)) { message *msg = 0; if (!can_give_to(u, u2)) {