From efd3f6f0d24a17c6c44b2bd5bdd0f42f2631ca8d 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/command.c') diff --git a/player/command.c b/player/command.c index 66ab4eb95f..2387eb25d8 100644 --- a/player/command.c +++ b/player/command.c @@ -4511,7 +4511,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