client API: don't explode when destroying uninitialized mpv_handle
This commit is contained in:
1 parent
bd75766ef0
commit
412bb336ab
1 file changed
+2
-1
+2
-1
@@ -210,7 +210,8 @@ void mpv_destroy(mpv_handle *ctx)
|
||||
talloc_free(ctx);
|
||||
ctx = NULL;
|
||||
// shutdown_clients() sleeps to avoid wasting CPU
|
||||
mp_input_wakeup(clients->mpctx->input);
|
||||
if (clients->mpctx->input)
|
||||
mp_input_wakeup(clients->mpctx->input);
|
||||
// TODO: make core quit if there are no clients
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user