]> git.sesse.net Git - vlc/blobdiff - modules/misc/osd/simple.c
Change the message shown by the update dialog: fix #1788.
[vlc] / modules / misc / osd / simple.c
index 0523b75b4350b27b9238ba43c28615fe859dc127..41e795f65cfde1a9d97b10820035e1714ebf8394 100644 (file)
@@ -29,7 +29,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_vout.h>
 #include <vlc_config.h>
 
@@ -223,7 +223,7 @@ int osd_parser_simpleOpen( vlc_object_t *p_this )
                     osd_state_t   *p_range_prev = NULL;    /* previous state processed range */
                     int i_index = 0;
 
-                    p_up->b_range = VLC_TRUE;
+                    p_up->b_range = true;
 
                     result = fscanf( fd, "\t%24s", &action[0] );
                     if( result == 0 )
@@ -270,9 +270,15 @@ int osd_parser_simpleOpen( vlc_object_t *p_this )
                         else /* absolute paths are used. */
                             p_range_current = osd_StateNew( p_menu, &file[0], "pressed" );
 
-                        if( !p_range_current || !p_range_current->p_pic )
+                        if( !p_range_current )
                             goto error;
 
+                        if( !p_range_current->p_pic )
+                        {
+                            osd_StatesFree( p_menu, p_range_current );
+                            goto error;
+                        }
+
                         p_range_current->i_x = i_x;
                         p_range_current->i_y = i_y;
 
@@ -323,7 +329,7 @@ int osd_parser_simpleOpen( vlc_object_t *p_this )
                 osd_state_t   *p_range_prev = NULL;    /* previous state processed range */
                 int i_index = 0;
 
-                p_current->b_range = VLC_TRUE;
+                p_current->b_range = true;
 
                 result = fscanf( fd, "\t%24s", &action[0] );
                 if( result == 0 )
@@ -369,8 +375,14 @@ int osd_parser_simpleOpen( vlc_object_t *p_this )
                     else /* absolute paths are used. */
                         p_range_current = osd_StateNew( p_menu, &file[0], "pressed" );
 
-                    if( !p_range_current || !p_range_current->p_pic )
+                    if( !p_range_current )
+                        goto error;
+
+                    if( !p_range_current->p_pic )
+                    {
+                        osd_StatesFree( p_menu, p_range_current );
                         goto error;
+                    }
 
                     p_range_current->i_x = i_x;
                     p_range_current->i_y = i_y;
@@ -439,8 +451,14 @@ int osd_parser_simpleOpen( vlc_object_t *p_this )
             else /* absolute paths are used. */
                 p_state_current = osd_StateNew( p_menu, &file[0], &state[0] );
 
-            if( !p_state_current || !p_state_current->p_pic )
+            if( !p_state_current )
+                goto error;
+
+            if( !p_state_current->p_pic )
+            {
+                osd_StatesFree( p_menu, p_state_current );
                 goto error;
+            }
 
             p_state_current->i_x = i_x;
             p_state_current->i_y = i_y;