]> git.sesse.net Git - vlc/commitdiff
Fixed text_style_Copy() behaviour.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 27 Feb 2010 21:48:22 +0000 (22:48 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 27 Feb 2010 23:27:08 +0000 (00:27 +0100)
src/video_output/video_text.c

index ef522ef0c2cda70b8d25c83f3151bfefdd486506..d9383c602e24931a7dde657280df9f3b9c1ec474 100644 (file)
@@ -184,16 +184,11 @@ text_style_t *text_style_Copy( text_style_t *p_dst, const text_style_t *p_src )
     if( !p_src )
         return p_dst;
 
-    /* */
-    if( p_dst->psz_fontname )
-        free( p_dst->psz_fontname );
-
     /* */
     *p_dst = *p_src;
 
-    /* */
-    if( p_dst->psz_fontname )
-        p_dst->psz_fontname = strdup( p_dst->psz_fontname );
+    if( p_src->psz_fontname )
+        p_dst->psz_fontname = strdup( p_src->psz_fontname );
 
     return p_dst;
 }