summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-10 18:28:09 +0100
committerwm4 <wm4@nowhere>2014-12-10 18:28:09 +0100
commitefd3f6f0d24a17c6c44b2bd5bdd0f42f2631ca8d (patch)
tree3d84464246e44e810c58fc61d29573f8ff31c542 /player/command.c
parentf0cdd673a80ff8f89b3f4c136620e398217bfccf (diff)
downloadmpv-efd3f6f0d24a17c6c44b2bd5bdd0f42f2631ca8d.tar.bz2
mpv-efd3f6f0d24a17c6c44b2bd5bdd0f42f2631ca8d.tar.xz
command: fix crash with some forms of script_binding
"script_binding name ..." just crashed it. Oops.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c2
1 files changed, 1 insertions, 1 deletions
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;