From 8dfd93c6fbaa2af1f0f996072f0db52bd83ee28d Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 28 May 2014 01:07:24 +0200 Subject: vo_vaapi: cleanup error handling on init Close the X connection if initializing vaapi fails. --- video/out/x11_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'video/out/x11_common.c') diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 6ca8be01f2..6159cb8ddc 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -585,7 +585,8 @@ static void vo_x11_classhint(struct vo *vo, Window window, const char *name) void vo_x11_uninit(struct vo *vo) { struct vo_x11_state *x11 = vo->x11; - assert(x11); + if (!x11) + return; mp_input_put_key(vo->input_ctx, MP_INPUT_RELEASE_ALL); -- cgit v1.2.3