]> git.sesse.net Git - vlc/commitdiff
Don't crash on null metas
authorClément Stenac <zorglub@videolan.org>
Sun, 2 Apr 2006 13:20:55 +0000 (13:20 +0000)
committerClément Stenac <zorglub@videolan.org>
Sun, 2 Apr 2006 13:20:55 +0000 (13:20 +0000)
modules/demux/mp4/mp4.c

index 261a1fee167b1d1992079c77b9739390bf48fff9..49d399264bbce1a9fc935071cfaec2981e0bdf14 100644 (file)
@@ -821,7 +821,10 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             for( p_0xa9xxx = p_udta->p_first; p_0xa9xxx != NULL;
                  p_0xa9xxx = p_0xa9xxx->p_next )
             {
-                char *psz_utf = strdup( p_0xa9xxx->data.p_0xa9xxx->psz_text );
+                char *psz_utf;
+                if( !p_0xa9xxx || !p_0xa9xxx->data.p_0xa9xxx )
+                    continue;
+                psz_utf = strdup( p_0xa9xxx->data.p_0xa9xxx->psz_text );
                 if( psz_utf == NULL )
                     continue;
                 /* FIXME FIXME: should convert from whatever the character