Commit ed769d22 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

XCB global hotkeys: fix X11 connection failure handling

parent 0c3fb79a
...@@ -101,7 +101,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -101,7 +101,7 @@ static int Open( vlc_object_t *p_this )
p_sys->p_connection = xcb_connect( psz_display, &i_screen_default ); p_sys->p_connection = xcb_connect( psz_display, &i_screen_default );
free( psz_display ); free( psz_display );
if( !p_sys->p_connection ) if( xcb_connection_has_error( p_sys->p_connection ) )
goto error; goto error;
/* Get the root windows of the default screen */ /* Get the root windows of the default screen */
...@@ -142,7 +142,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -142,7 +142,6 @@ static int Open( vlc_object_t *p_this )
error: error:
if( p_sys->p_symbols ) if( p_sys->p_symbols )
xcb_key_symbols_free( 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 ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment