[vlc-devel] commit: XCB global hotkeys: fix X11 connection failure handling ( cherry picked from commit ed769d221904d20062ec95648e774abd2a43297a) ( Rémi Denis-Courmont )
git version control
git at videolan.org
Mon Nov 16 21:48:01 CET 2009
vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov 3 21:28:26 2009 +0200| [ff79f2ae775c39385ea5f07a4086659f81c448aa] | committer: Rafaël Carré
XCB global hotkeys: fix X11 connection failure handling (cherry picked from commit ed769d221904d20062ec95648e774abd2a43297a)
Signed-off-by: Rafaël Carré <rafael.carre at gmail.com>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ff79f2ae775c39385ea5f07a4086659f81c448aa
---
modules/control/globalhotkeys/xcb.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/control/globalhotkeys/xcb.c b/modules/control/globalhotkeys/xcb.c
index 2e51c8d..356f233 100644
--- a/modules/control/globalhotkeys/xcb.c
+++ b/modules/control/globalhotkeys/xcb.c
@@ -101,7 +101,7 @@ static int Open( vlc_object_t *p_this )
p_sys->p_connection = xcb_connect( psz_display, &i_screen_default );
free( psz_display );
- if( !p_sys->p_connection )
+ if( xcb_connection_has_error( p_sys->p_connection ) )
goto error;
/* Get the root windows of the default screen */
@@ -142,8 +142,7 @@ static int Open( vlc_object_t *p_this )
error:
if( p_sys->p_symbols )
xcb_key_symbols_free( p_sys->p_symbols );
- if( p_sys->p_connection )
- xcb_disconnect( p_sys->p_connection );
+ xcb_disconnect( p_sys->p_connection );
free( p_sys );
return VLC_EGENERIC;
}
More information about the vlc-devel
mailing list