summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-04 02:20:18 +0200
committerwm4 <wm4@nowhere>2014-07-04 02:24:49 +0200
commit4fedf86b8a7f19149e71041f12e417a3b0c7d7c8 (patch)
tree78d84ff481826bfefc72a0fe0cf3dbc21b195755
parent4a5cfb4323a276b920ab833ae3409064af58f322 (diff)
downloadmpv-4fedf86b8a7f19149e71041f12e417a3b0c7d7c8.tar.bz2
mpv-4fedf86b8a7f19149e71041f12e417a3b0c7d7c8.tar.xz
client API: allow calling mpv_terminate_destroy(NULL)
This is an oversight and a bug. CC: @mpv-player/stable
-rw-r--r--player/client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/player/client.c b/player/client.c
index ececec37f6..e7a993dd0e 100644
--- a/player/client.c
+++ b/player/client.c
@@ -330,6 +330,9 @@ static void get_thread(void *ptr)
void mpv_terminate_destroy(mpv_handle *ctx)
{
+ if (!ctx)
+ return;
+
mpv_command(ctx, (const char*[]){"quit", NULL});
if (!ctx->owner) {