[vlc-commits] text_segment: Allow a segment to be created with NULL	text
    Hugo Beauzée-Luyssen 
    git at videolan.org
       
    Tue Jul 28 16:01:57 CEST 2015
    
    
  
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Jul  9 15:57:39 2015 +0200| [3696f33132381c7ce274c8112ca9478d551ec26c] | committer: Jean-Baptiste Kempf
text_segment: Allow a segment to be created with NULL text
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3696f33132381c7ce274c8112ca9478d551ec26c
---
 src/misc/text_style.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/misc/text_style.c b/src/misc/text_style.c
index 2241938..4dd27a3 100644
--- a/src/misc/text_style.c
+++ b/src/misc/text_style.c
@@ -100,7 +100,8 @@ text_segment_t *text_segment_New( const char *psz_text )
     if( !segment )
         return NULL;
 
-    segment->psz_text = strdup( psz_text );
+    if ( psz_text )
+        segment->psz_text = strdup( psz_text );
 
     return segment;
 }
    
    
More information about the vlc-commits
mailing list