]> git.sesse.net Git - vlc/commitdiff
win32text: don't render empty strings
authorPierre Ynard <linkfanel@yahoo.fr>
Fri, 18 Sep 2009 09:35:15 +0000 (11:35 +0200)
committerPierre Ynard <linkfanel@yahoo.fr>
Fri, 18 Sep 2009 09:35:15 +0000 (11:35 +0200)
modules/misc/win32text.c

index 89fc5f8db33eda056253c895fa9f3578fe4c2619..2c53cbff57e271bf21cb44a095b73081a91a68be 100644 (file)
@@ -307,6 +307,9 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
 
     /* Sanity check */
     if( !p_region_in || !p_region_out ) return VLC_EGENERIC;
+    if( !p_region_in->psz_text || !*p_region_in->psz_text )
+        return VLC_EGENERIC;
+
     psz_string = malloc( (strlen( p_region_in->psz_text )+1) * sizeof(TCHAR) );
     if( !psz_string )
         return VLC_ENOMEM;