0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

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
This commit is contained in:
wm4 2014-07-31 03:12:18 +02:00
parent dacbaea1a8
commit aaa90e1a33

View File

@ -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;
}