[vlc-devel] commit: fix a segfault when launching a video inside a tty. ( Rémi Duraffort )
git version control
git at videolan.org
Tue Mar 17 22:05:53 CET 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Mar 17 21:34:17 2009 +0100| [5dc266b9e98e0c28456d026c0628fb2ebfe72d13] | committer: Rémi Duraffort
fix a segfault when launching a video inside a tty.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5dc266b9e98e0c28456d026c0628fb2ebfe72d13
---
modules/control/globalhotkeys/xcb.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/modules/control/globalhotkeys/xcb.c b/modules/control/globalhotkeys/xcb.c
index 5aa894e..c5ecacf 100644
--- a/modules/control/globalhotkeys/xcb.c
+++ b/modules/control/globalhotkeys/xcb.c
@@ -101,7 +101,11 @@ static int Open( vlc_object_t *p_this )
/* Get the root windows of the default screen */
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++ )
{
if( !iter.rem )
More information about the vlc-devel
mailing list