* Local duplication functions, and local deallocation functions
*****************************************************************************/
static void DupDummy( vlc_value_t *p_val ) { (void)p_val; /* unused */ }
-static void DupString( vlc_value_t *p_val ) { if( p_val->psz_string ) p_val->psz_string = strdup( p_val->psz_string ); }
+static void DupString( vlc_value_t *p_val )
+{
+ p_val->psz_string = strdup( p_val->psz_string ? p_val->psz_string : "" );
+}
static void DupList( vlc_value_t *p_val )
{
free( p_var->psz_text );
if( p_val && p_val->psz_string )
p_var->psz_text = strdup( p_val->psz_string );
+ else
+ p_val->psz_text = NULL;
break;
case VLC_VAR_GETTEXT:
p_val->psz_string = NULL;
int i_var;
variable_t *p_var;
- if( p_this->p_parent || ( p_this->p_libvlc && p_this != p_this->p_libvlc ) )
+ if( p_this->p_parent || ( p_this->p_libvlc && p_this != (vlc_object_t*) p_this->p_libvlc ) )
{
vlc_object_internals_t *p_priv;
/* Duplicate value if needed */
p_var->ops->pf_dup( p_val );
+ /*msg_Dbg( p_this, "Inherited value for var %s from object %s",
+ psz_name ? psz_name : "(null)",
+ p_this->psz_object_name
+ ? p_this->psz_object_name : "(Unknown)" );*/
return VLC_SUCCESS;
}
else if ( p_this->p_parent ) /* We are still not there */
break;
}
default:
+ msg_Warn( p_this, "Could not inherit value for var %s "
+ "from config. Invalid Type", psz_name );
return VLC_ENOOBJ;
break;
}
+ /*msg_Dbg( p_this, "Inherited value for var %s from config", psz_name );*/
return VLC_SUCCESS;
}