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

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

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;