From 5dce714dfeeb5be9efbc5253bdf8c8fa857f802b Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 4 Jul 2014 02:20:18 +0200 Subject: client API: allow calling mpv_terminate_destroy(NULL) This is an oversight and a bug. CC: @mpv-player/stable --- player/client.c | 3 +++ 1 file changed, 3 insertions(+) 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) { -- cgit v1.2.3