[vlc-devel] commit: Made var_GetNonEmptyString robust against var_GetString allocation error. (Laurent Aimar )
git version control
git at videolan.org
Sun Mar 22 16:30:18 CET 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Mar 22 16:24:49 2009 +0100| [13558d8d791ef846c80783d0b06b3714ab65048e] | committer: Laurent Aimar
Made var_GetNonEmptyString robust against var_GetString allocation error.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=13558d8d791ef846c80783d0b06b3714ab65048e
---
include/vlc_variables.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/vlc_variables.h b/include/vlc_variables.h
index 22d8ddf..a7ce058 100644
--- a/include/vlc_variables.h
+++ b/include/vlc_variables.h
@@ -399,7 +399,7 @@ static inline char *__var_GetNonEmptyString( vlc_object_t *p_obj, const char *ps
vlc_value_t val;
if( var_GetChecked( p_obj, psz_name, VLC_VAR_STRING, &val ) )
return NULL;
- if( *val.psz_string )
+ if( val.psz_string && *val.psz_string )
return val.psz_string;
free( val.psz_string );
return NULL;
More information about the vlc-devel
mailing list