From 09ed6d819e56ab8405d47eba7b1fcfe8c0778899 Mon Sep 17 00:00:00 2001 From: Benjamin Pracht Date: Fri, 2 Sep 2005 14:00:20 +0000 Subject: [PATCH] * Don't try to release NULL * Fixes the "vlc would crash when hitting play" bug --- src/video_output/video_widgets.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video_output/video_widgets.c b/src/video_output/video_widgets.c index 0b7798c123..c9fa82b13d 100644 --- a/src/video_output/video_widgets.c +++ b/src/video_output/video_widgets.c @@ -40,6 +40,7 @@ void vout_OSDSlider( vlc_object_t *p_caller, int i_channel, int i_position, { vout_thread_t *p_vout = vlc_object_find( p_caller, VLC_OBJECT_VOUT, FIND_ANYWHERE ); + if( p_vout && ( config_GetInt( p_caller, "osd" ) || ( i_position >= 0 ) ) ) { osd_Slider( p_caller, p_vout->p_spu, p_vout->render.i_width, @@ -56,10 +57,12 @@ void vout_OSDIcon( vlc_object_t *p_caller, int i_channel, short i_type ) { vout_thread_t *p_vout = vlc_object_find( p_caller, VLC_OBJECT_VOUT, FIND_ANYWHERE ); + + if( !p_vout ) return; + if( p_vout && config_GetInt( p_caller, "osd" ) ) { osd_Icon( p_caller, p_vout->p_spu, p_vout->render.i_width, p_vout->render.i_height, i_channel, i_type ); } - vlc_object_release( p_vout ); } -- 2.39.5