From aaa90e1a337dac7f1ef0e8e289d50950a67c90a1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 31 Jul 2014 03:12:18 +0200 Subject: client API: fix deadlock when calling mpv_terminate_destroy before init This is perfectly allowed, but was ignored, because it's a corner case. It doesn't actually wait for other clients to be destroyed, but on the other hand I think there's no way to have other clients before initialization. CC: @mpv-player/stable --- player/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/client.c') diff --git a/player/client.c b/player/client.c index 0a64dd855d..49cb866edb 100644 --- a/player/client.c +++ b/player/client.c @@ -335,7 +335,7 @@ void mpv_terminate_destroy(mpv_handle *ctx) mpv_command(ctx, (const char*[]){"quit", NULL}); - if (!ctx->owner) { + if (!ctx->owner || !ctx->mpctx->initialized) { mpv_detach_destroy(ctx); return; } -- cgit v1.2.3