Commit 17972559 authored by Laurent Aimar's avatar Laurent Aimar

Fixed potential segfault on error with mkv demuxer.

parent 3d356aef
...@@ -592,14 +592,17 @@ void demux_sys_t::InitUi() ...@@ -592,14 +592,17 @@ void demux_sys_t::InitUi()
/* FIXME hack hack hack hack FIXME */ /* FIXME hack hack hack hack FIXME */
/* Get p_input and create variable */ /* Get p_input and create variable */
p_input = demux_GetParentInput( &demuxer ); p_input = demux_GetParentInput( &demuxer );
var_Create( p_input, "x-start", VLC_VAR_INTEGER ); if( p_input )
var_Create( p_input, "y-start", VLC_VAR_INTEGER ); {
var_Create( p_input, "x-end", VLC_VAR_INTEGER ); var_Create( p_input, "x-start", VLC_VAR_INTEGER );
var_Create( p_input, "y-end", VLC_VAR_INTEGER ); var_Create( p_input, "y-start", VLC_VAR_INTEGER );
var_Create( p_input, "color", VLC_VAR_ADDRESS ); var_Create( p_input, "x-end", VLC_VAR_INTEGER );
var_Create( p_input, "menu-palette", VLC_VAR_ADDRESS ); var_Create( p_input, "y-end", VLC_VAR_INTEGER );
var_Create( p_input, "highlight", VLC_VAR_BOOL ); var_Create( p_input, "color", VLC_VAR_ADDRESS );
var_Create( p_input, "highlight-mutex", VLC_VAR_MUTEX ); var_Create( p_input, "menu-palette", VLC_VAR_ADDRESS );
var_Create( p_input, "highlight", VLC_VAR_BOOL );
var_Create( p_input, "highlight-mutex", VLC_VAR_MUTEX );
}
/* Now create our event thread catcher */ /* Now create our event thread catcher */
p_ev = new event_thread_t(&demuxer); p_ev = new event_thread_t(&demuxer);
...@@ -610,16 +613,19 @@ void demux_sys_t::CleanUi() ...@@ -610,16 +613,19 @@ void demux_sys_t::CleanUi()
delete p_ev; delete p_ev;
p_ev = NULL; p_ev = NULL;
var_Destroy( p_input, "highlight-mutex" ); if( p_input )
var_Destroy( p_input, "highlight" ); {
var_Destroy( p_input, "x-start" ); var_Destroy( p_input, "highlight-mutex" );
var_Destroy( p_input, "x-end" ); var_Destroy( p_input, "highlight" );
var_Destroy( p_input, "y-start" ); var_Destroy( p_input, "x-start" );
var_Destroy( p_input, "y-end" ); var_Destroy( p_input, "x-end" );
var_Destroy( p_input, "color" ); var_Destroy( p_input, "y-start" );
var_Destroy( p_input, "menu-palette" ); var_Destroy( p_input, "y-end" );
var_Destroy( p_input, "color" );
vlc_object_release( p_input ); var_Destroy( p_input, "menu-palette" );
vlc_object_release( p_input );
}
msg_Dbg( &demuxer, "Stopping the UI Hook" ); msg_Dbg( &demuxer, "Stopping the UI Hook" );
} }
......
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