[vlc-commits] video_filter/logo: remove usage of abort
Filip Roséen
git at videolan.org
Sun Jun 5 17:15:22 CEST 2016
vlc | branch: master | Filip Roséen <filip at videolabs.io> | Sun Jun 5 17:08:37 2016 +0200| [e29854a8bbcc50b6df7e35e67d1325c1b4731fa3] | committer: Thomas Guillem
video_filter/logo: remove usage of abort
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e29854a8bbcc50b6df7e35e67d1325c1b4731fa3
---
modules/video_filter/logo.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/video_filter/logo.c b/modules/video_filter/logo.c
index 8dcd2b1..c17dc1b 100644
--- a/modules/video_filter/logo.c
+++ b/modules/video_filter/logo.c
@@ -653,8 +653,9 @@ static void LogoListLoad( vlc_object_t *p_this, logo_list_t *p_logo_list,
p_logo_list->i_next_pic = 0;
psz_original = psz_list = strdup( psz_filename );
+
if( !psz_list )
- abort();
+ return;
/* Count the number logos == number of ';' + 1 */
p_logo_list->i_count = 1;
@@ -666,8 +667,12 @@ static void LogoListLoad( vlc_object_t *p_this, logo_list_t *p_logo_list,
p_logo_list->p_logo =
p_logo = calloc( p_logo_list->i_count, sizeof(*p_logo) );
+
if( !p_logo )
- abort();
+ {
+ free( psz_list );
+ return;
+ }
/* Fill the data */
for( unsigned i = 0; i < p_logo_list->i_count; i++ )
More information about the vlc-commits
mailing list