From 4fedf86b8a7f19149e71041f12e417a3b0c7d7c8 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(+) (limited to 'player') 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