Commit 13558d8d authored by Laurent Aimar's avatar Laurent Aimar

Made var_GetNonEmptyString robust against var_GetString allocation error.

parent 2f1485c1
...@@ -399,7 +399,7 @@ static inline char *__var_GetNonEmptyString( vlc_object_t *p_obj, const char *ps ...@@ -399,7 +399,7 @@ static inline char *__var_GetNonEmptyString( vlc_object_t *p_obj, const char *ps
vlc_value_t val; vlc_value_t val;
if( var_GetChecked( p_obj, psz_name, VLC_VAR_STRING, &val ) ) if( var_GetChecked( p_obj, psz_name, VLC_VAR_STRING, &val ) )
return NULL; return NULL;
if( *val.psz_string ) if( val.psz_string && *val.psz_string )
return val.psz_string; return val.psz_string;
free( val.psz_string ); free( val.psz_string );
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment