From 412bb336ab740ef42c36d1bd4a786f1382d2ccd3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 26 Feb 2014 20:41:14 +0100 Subject: client API: don't explode when destroying uninitialized mpv_handle --- player/client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player') diff --git a/player/client.c b/player/client.c index 27e3dfc08c..778070f266 100644 --- a/player/client.c +++ b/player/client.c @@ -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; } -- cgit v1.2.3