client API: allow calling mpv_terminate_destroy(NULL)

This is an oversight and a bug.

CC: @mpv-player/stable
This commit is contained in:
wm4 2014-07-04 02:20:18 +02:00
parent 4a5cfb4323
commit 4fedf86b8a
1 changed files with 3 additions and 0 deletions

View File

@ -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) {