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 89fc5f8..2c53cbf 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;