client API: accept NULL as mpv_destroy() argument

This commit is contained in:
wm4 2014-02-26 20:40:50 +01:00
parent e749470018
commit bd75766ef0
1 changed files with 3 additions and 0 deletions

View File

@ -188,6 +188,9 @@ void mpv_resume(mpv_handle *ctx)
void mpv_destroy(mpv_handle *ctx)
{
if (!ctx)
return;
struct mp_client_api *clients = ctx->clients;
pthread_mutex_lock(&clients->lock);