Commit 928dc811 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

taglib: Check if a tablig string is !null and !empty before we try to use it.

(cherry picked from commit 1f0135f4)
Signed-off-by: default avatarDerk-Jan Hartman <hartman@videolan.org>
parent 67fef918
......@@ -409,7 +409,8 @@ vlc_meta_Set##bar( p_meta, p_t->toString().toCString(true))
}
}
#define SET( foo, bar ) vlc_meta_Set##foo( p_meta, p_tag->bar ().toCString(true))
#define SET( foo, bar ) if( !p_tag->bar ().isNull() && !p_tag->bar ().isEmpty() ) \
vlc_meta_Set##foo( p_meta, p_tag->bar ().toCString(true))
#define SETINT( foo, bar ) { \
char psz_tmp[10]; \
snprintf( (char*)psz_tmp, 10, "%d", p_tag->bar() ); \
......
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