diff options
author | wm4 <wm4@nowhere> | 2014-07-04 02:20:18 +0200 |
---|---|---|
committer | Alessandro Ghedini <alessandro@ghedini.me> | 2014-07-05 00:28:54 +0200 |
commit | 5dce714dfeeb5be9efbc5253bdf8c8fa857f802b (patch) | |
tree | e05e2f1e489080d76c29a94967dbf7312fc42116 | |
parent | 25a07099725ae28c2ed898d299ca7439cdcd6d2b (diff) | |
download | mpv-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.c | 3 |
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) { |