[vlc-devel] [PATCH 5/7] config/chain: only create variable if it does not exists
Filip Roséen
filip at atch.se
Wed Oct 12 19:39:37 CEST 2016
---
src/config/chain.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/config/chain.c b/src/config/chain.c
index 7d0b71d..e20585d 100644
--- a/src/config/chain.c
+++ b/src/config/chain.c
@@ -281,9 +281,13 @@ void config_ChainParse( vlc_object_t *p_this, const char *psz_prefix,
char name[plen + strlen( optname )];
snprintf( name, sizeof (name), "%s%s", psz_prefix, optname );
- if( var_Create( p_this, name,
- config_GetType( p_this, name ) | VLC_VAR_DOINHERIT ) )
- return /* VLC_xxx */;
+
+ if( var_Type( p_this, name ) == 0 )
+ {
+ if( var_Create( p_this, name, config_GetType( p_this, name ) |
+ VLC_VAR_DOINHERIT ) )
+ return /* VLC_xxx */;
+ }
}
/* Now parse options and set value */
--
2.10.0
More information about the vlc-devel
mailing list