diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-28 01:12:34 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-28 01:12:34 +0200 |
commit | 42244dd2a46ff0e14c6192fa7d8fdb01d033befa (patch) | |
tree | 0508d7379d53163cdb5552e151532ae3e95f60c9 /libvo | |
parent | c710c5ee504530eeb7ef7c73f6665fdb291dd206 (diff) | |
download | mpv-42244dd2a46ff0e14c6192fa7d8fdb01d033befa.tar.bz2 mpv-42244dd2a46ff0e14c6192fa7d8fdb01d033befa.tar.xz |
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).
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/x11_common.c | 13 |
1 files changed, 6 insertions, 7 deletions
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); } |