summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-26 20:41:14 +0100
committerwm4 <wm4@nowhere>2014-02-26 21:03:35 +0100
commit412bb336ab740ef42c36d1bd4a786f1382d2ccd3 (patch)
treeb8e4674a9b69c6b1c6a8b9364aa57b64d1357b9f /player
parentbd75766ef0ebbd87e6a6c94f25d6f134e88c57eb (diff)
downloadmpv-412bb336ab740ef42c36d1bd4a786f1382d2ccd3.tar.bz2
mpv-412bb336ab740ef42c36d1bd4a786f1382d2ccd3.tar.xz
client API: don't explode when destroying uninitialized mpv_handle
Diffstat (limited to 'player')
-rw-r--r--player/client.c3
1 files changed, 2 insertions, 1 deletions
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;
}