Commit ee0a4d82 authored by Rafaël Carré's avatar Rafaël Carré

Don't dump/clean media library if it's not active

Bug spotted by Anthony Loiseau
parent 4ce6c3f3
...@@ -484,17 +484,19 @@ void playlist_LastLoop( playlist_t *p_playlist ) ...@@ -484,17 +484,19 @@ void playlist_LastLoop( playlist_t *p_playlist )
p_playlist->pp_sds[0]->p_sd->psz_module ); p_playlist->pp_sds[0]->p_sd->psz_module );
} }
playlist_MLDump( p_playlist ); if( config_GetInt( p_playlist, "media-library" ) )
{
/* Because this recursive function decreases the playlist_MLDump( p_playlist );
* p_playlist->p_ml_category refcount, it may get deleted. /* Because this recursive function decreases the
* However we will delete the p_playlist->p_ml_category in the * p_playlist->p_ml_category refcount, it may get deleted.
* following FOREACH. */ * However we will delete the p_playlist->p_ml_category in the
vlc_gc_incref( p_playlist->p_ml_category->p_input ); * following FOREACH. */
vlc_gc_incref( p_playlist->p_ml_category->p_input );
/* We don't need the media library anymore */
/* Decref all subitems, and the given items */ /* We don't need the media library anymore */
recursively_decref( p_playlist->p_ml_category ); /* Decref all subitems, and the given items */
recursively_decref( p_playlist->p_ml_category );
}
PL_LOCK; PL_LOCK;
FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->all_items ) FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->all_items )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment