client API: don't explode when destroying uninitialized mpv_handle

This commit is contained in:
wm4 committed 2014-02-26 21:03:35 +01:00
1 parent bd75766ef0
commit 412bb336ab
1 file changed
+2 -1
+2 -1
View File
@@ -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;
}