Fix crash
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 11 Oct 2008 14:44:10 +0000 (17:44 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 11 Oct 2008 14:44:10 +0000 (17:44 +0300)
src/control/media_player.c

index 1248e1f..7a36dd7 100644 (file)
@@ -896,8 +896,8 @@ int libvlc_media_player_get_chapter_count_for_title(
     if( !p_input_thread )
         return -1;
 
-    char *psz_name = NULL;
-    if( asprintf( psz_name,  "title %2i", i_title ) == -1 )
+    char *psz_name;
+    if( asprintf( &psz_name,  "title %2i", i_title ) == -1 )
     {
         vlc_object_release( p_input_thread );
         return -1;