Do not call EnsureUTF8 on NULL string (cdtext).
authorLaurent Aimar <fenrir@videolan.org>
Fri, 15 May 2009 21:20:15 +0000 (23:20 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Fri, 15 May 2009 23:03:32 +0000 (01:03 +0200)
modules/access/vcd/cdrom.c

index 10c5a7d..22b29de 100644 (file)
@@ -1330,7 +1330,8 @@ static int CdTextParse( vlc_meta_t ***ppp_tracks, int *pi_tracks,
         for( int i = 0; i <= i_track_last; i++ )
         {
             /* */
-            EnsureUTF8( pppsz_info[i][j] );
+            if( pppsz_info[i][j] )
+                EnsureUTF8( pppsz_info[i][j] );
 
             /* */
             const char *psz_default = pppsz_info[0][j];