]> git.sesse.net Git - vlc/commitdiff
Fix refcount problem (thanks to DrakeGuan for spotting it)
authorChristophe Mutricy <xtophe@videolan.org>
Mon, 8 Aug 2005 09:57:45 +0000 (09:57 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Mon, 8 Aug 2005 09:57:45 +0000 (09:57 +0000)
src/video_output/video_widgets.c

index 64b57e270b097f5521d43afdcf6dc5156756a00e..a77c695098858d3a1233b9dd90d7ac35bb9051da 100644 (file)
@@ -217,11 +217,15 @@ void vout_OSDSlider( vlc_object_t *p_caller, int i_channel, int i_position,
     subpicture_t *p_subpic;
     int i_x_margin, i_y_margin, i_x, i_y, i_width, i_height;
 
-    if( p_vout == NULL || !config_GetInt( p_caller, "osd" ) || i_position < 0 )
+    if( p_vout == NULL )
     {
         return;
     }
-
+    if( !config_GetInt( p_caller, "osd" ) || i_position < 0 )
+    {
+        vlc_object_release( p_vout );
+        return;
+    }
     p_subpic = vout_CreateWidget( p_vout->p_spu, i_channel );
     if( p_subpic == NULL )
     {