fix crash when a GIVE order has no arguments.

This commit is contained in:
Enno Rehling 2014-12-13 18:40:15 +01:00
parent a12958dac0
commit 3a1e4ab7f5
1 changed files with 1 additions and 1 deletions

View File

@ -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)) {