From 1326d3f0b8ec4a50c24d1b98a66770c97a5af2fa Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 10 Dec 2014 18:28:09 +0100 Subject: command: fix crash with some forms of script_binding "script_binding name ..." just crashed it. Oops. --- player/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') diff --git a/player/command.c b/player/command.c index 2da13731e6..cec28491d4 100644 --- a/player/command.c +++ b/player/command.c @@ -4494,7 +4494,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd) char *sep = strchr(name, '/'); char *target = NULL; char space[MAX_CLIENT_NAME]; - if (name) { + if (sep) { snprintf(space, sizeof(space), "%.*s", (int)(sep - name), name); target = space; name = sep + 1; -- cgit v1.2.3