./modules/control/rc/rc.c: fixed a segfault when pressing 'i' with no

input
parent 5a64fbd7
......@@ -2,7 +2,7 @@
* rc.c : remote control stdin/stdout plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: rc.c,v 1.1 2002/08/04 17:23:42 sam Exp $
* $Id: rc.c,v 1.2 2002/08/13 13:15:14 sigmunau Exp $
*
* Authors: Peter Surda <shurdeek@panorama.sth.ac.at>
*
......@@ -288,6 +288,7 @@ static void Run( intf_thread_t *p_intf )
break;
case 'i':
case 'I':
if ( p_input ) {
printf( "Dumping stream info\n" );
vlc_mutex_lock( &p_input->stream.stream_lock );
p_category = p_input->stream.p_info;
......@@ -309,6 +310,11 @@ static void Run( intf_thread_t *p_intf )
psz_dashes[78] = '\0';
printf( "+%s+\n", psz_dashes );
vlc_mutex_unlock( &p_input->stream.stream_lock );
}
else
{
printf( "no input" );
}
break;
case '\0':
/* Ignore empty lines */
......
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