]> git.sesse.net Git - vlc/blobdiff - modules/access/directory.c
Do not use playlist_*AddInput() when the playlist has already been destroyed and...
[vlc] / modules / access / directory.c
index 7218bfd293f53531356e24983497df955d862e91..f49a66f57146c8cccd97b8d8a8bd015b46ebe7f8 100644 (file)
@@ -530,13 +530,15 @@ static int ReadDir( playlist_t *p_playlist, const char *psz_name,
                 {
                     if( p_current_input )
                         input_ItemCopyOptions( p_current_input, p_input );
-                    playlist_BothAddInput( p_playlist, p_input,
+                    int i_ret = playlist_BothAddInput( p_playlist, p_input,
                                            p_parent_category,
                                            PLAYLIST_APPEND|PLAYLIST_PREPARSE|
                                            PLAYLIST_NO_REBUILD,
                                            PLAYLIST_END, NULL, NULL,
                                            VLC_FALSE );
                     vlc_gc_decref( p_input );
+                    if( i_ret != VLC_SUCCESS )
+                        return VLC_EGENERIC;
                 }
             }
         }