summaryrefslogtreecommitdiffstats
path: root/player/client.c
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2014-10-11 16:16:56 +1100
committerJames Ross-Gowan <rossymiles@gmail.com>2014-10-12 00:56:41 +1100
commit2782f0649105bf9fdce91cfa2b6d4e8dbc56c2a3 (patch)
treeee773b5704192b6aa5347332ea17e361adceb582 /player/client.c
parente48b2bd4d1416d44e905d2fb70d9761292c94469 (diff)
downloadmpv-2782f0649105bf9fdce91cfa2b6d4e8dbc56c2a3.tar.bz2
mpv-2782f0649105bf9fdce91cfa2b6d4e8dbc56c2a3.tar.xz
client API: check result ptr in mpv_command_node
This follows the docs, which say the result parameter is optional.
Diffstat (limited to 'player/client.c')
-rw-r--r--player/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/client.c b/player/client.c
index 6bb9b18160..b7ee01066f 100644
--- a/player/client.c
+++ b/player/client.c
@@ -883,7 +883,7 @@ int mpv_command(mpv_handle *ctx, const char **args)
int mpv_command_node(mpv_handle *ctx, mpv_node *args, mpv_node *result)
{
int r = run_client_command(ctx, mp_input_parse_cmd_node(ctx->log, args));
- if (r >= 0)
+ if (result && r >= 0)
*result = (mpv_node){.format = MPV_FORMAT_NONE};
return r;
}