mirror of https://github.com/mpv-player/mpv
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:
parent
dacbaea1a8
commit
aaa90e1a33
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue