summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-04 02:20:18 +0200
committerAlessandro Ghedini <alessandro@ghedini.me>2014-07-05 00:28:54 +0200
commit5dce714dfeeb5be9efbc5253bdf8c8fa857f802b (patch)
treee05e2f1e489080d76c29a94967dbf7312fc42116
parent25a07099725ae28c2ed898d299ca7439cdcd6d2b (diff)
downloadmpv-5dce714dfeeb5be9efbc5253bdf8c8fa857f802b.tar.bz2
mpv-5dce714dfeeb5be9efbc5253bdf8c8fa857f802b.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) {