From 42244dd2a46ff0e14c6192fa7d8fdb01d033befa Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Thu, 28 Jan 2010 01:12:34 +0200 Subject: x11_common: always free x11 context struct on exit Previously it was not freed if no X11 display had been opened (for example -vo null). --- libvo/x11_common.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'libvo') diff --git a/libvo/x11_common.c b/libvo/x11_common.c index b6ab203a6a..85ba55cc3f 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -520,14 +520,13 @@ void vo_uninit(struct vo_x11_state *x11) { mp_msg(MSGT_VO, MSGL_V, "vo: x11 uninit called but X11 not initialized..\n"); - return; + } else { + mp_msg(MSGT_VO, MSGL_V, "vo: uninit ...\n"); + XSetErrorHandler(NULL); + XCloseDisplay(x11->display); + x11->depthonscreen = 0; + x11->display = NULL; } -// if( !vo_depthonscreen ) return; - mp_msg(MSGT_VO, MSGL_V, "vo: uninit ...\n"); - XSetErrorHandler(NULL); - XCloseDisplay(x11->display); - x11->depthonscreen = 0; - x11->display = NULL; talloc_free(x11); } -- cgit v1.2.3