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 64ed7d3..2dcd29d 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');