]> git.sesse.net Git - vlc/commitdiff
variables: Fix two typos in InheritValue().
authorPierre d'Herbemont <pdherbemont@free.fr>
Wed, 30 Dec 2009 05:02:42 +0000 (06:02 +0100)
committerPierre d'Herbemont <pdherbemont@free.fr>
Wed, 30 Dec 2009 05:02:42 +0000 (06:02 +0100)
First one is about starting to inherit from the parent. Shouldn't hurt much.
Second one is about looking to inherit from the right variable. hurt more.

src/misc/variables.c

index c15a7518f6ce0cba9dea7d2b4c9254bd6b37f2de..b930544a5e4fa1fca50bb24b8997bc04f54362e7 100644 (file)
@@ -1404,8 +1404,8 @@ static int InheritValue( vlc_object_t *p_this, const char *psz_name,
                          vlc_value_t *p_val, int i_type )
 {
     i_type &= VLC_VAR_CLASS;
-    for( vlc_object_t *obj = p_this; obj != NULL; obj = obj->p_parent )
-        if( var_GetChecked( p_this, psz_name, i_type, p_val ) == VLC_SUCCESS )
+    for( vlc_object_t *obj = p_this->p_parent; obj != NULL; obj = obj->p_parent )
+        if( var_GetChecked( obj, psz_name, i_type, p_val ) == VLC_SUCCESS )
             return VLC_SUCCESS;
 
     /* else take value from config */