Commit 5dc266b9 authored by Rémi Duraffort's avatar Rémi Duraffort

fix a segfault when launching a video inside a tty.

parent 3f27d44e
...@@ -101,7 +101,11 @@ static int Open( vlc_object_t *p_this ) ...@@ -101,7 +101,11 @@ static int Open( vlc_object_t *p_this )
/* Get the root windows of the default screen */ /* Get the root windows of the default screen */
memset( &p_sys->root, 0, sizeof( p_sys->root ) ); memset( &p_sys->root, 0, sizeof( p_sys->root ) );
xcb_screen_iterator_t iter = xcb_setup_roots_iterator( xcb_get_setup( p_sys->p_connection ) );
const xcb_setup_t* xcbsetup = xcb_get_setup( p_sys->p_connection );
if( !xcbsetup )
goto error;
xcb_screen_iterator_t iter = xcb_setup_roots_iterator( xcbsetup );
for( int i = 0; i < i_screen_default; i++ ) for( int i = 0; i < i_screen_default; i++ )
{ {
if( !iter.rem ) if( !iter.rem )
......
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