client API: don't explode when destroying uninitialized mpv_handle

This commit is contained in:
wm4 2014-02-26 20:41:14 +01:00
parent bd75766ef0
commit 412bb336ab
1 changed files with 2 additions and 1 deletions

View File

@ -210,6 +210,7 @@ void mpv_destroy(mpv_handle *ctx)
talloc_free(ctx);
ctx = NULL;
// shutdown_clients() sleeps to avoid wasting CPU
if (clients->mpctx->input)
mp_input_wakeup(clients->mpctx->input);
// TODO: make core quit if there are no clients
break;