]> git.sesse.net Git - vlc/commitdiff
Catch error case.
authorJean-Paul Saman <jpsaman@videolan.org>
Fri, 9 May 2008 14:57:19 +0000 (16:57 +0200)
committerJean-Paul Saman <jpsaman@videolan.org>
Fri, 9 May 2008 15:52:18 +0000 (17:52 +0200)
modules/gui/fbosd.c

index 64ed7d3198c23c1bfe68501fa2d2f609201a2664..2dcd29d498637788a97f1c661a7f3f9c3ce9cb88 100644 (file)
@@ -873,6 +873,11 @@ static picture_t *RenderText( intf_thread_t *p_intf, const char *psz_string,
         memset( p_region, 0, sizeof(subpicture_region_t) );
 
         p_region->psz_text = strdup( psz_string );
+        if( !p_region->psz_text )
+        {
+            free( p_region );
+            return NULL;
+        }
         p_region->p_style = p_style;
 
         p_region->fmt.i_chroma = VLC_FOURCC('T','E','X','T');