[vlc-devel] [PATCH] playlist: ignore event on removed item
Romain Vimont
rom1v at videolabs.io
Mon Sep 3 13:49:26 CEST 2018
A (pre-)parsing request may signal a "subtree added" event once the item
has already been removed for the playlist. In that case, ignore it.
Fixes #21107
---
src/playlist/item.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/playlist/item.c b/src/playlist/item.c
index a6d375f66e..eb61ee8655 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -70,7 +70,9 @@ void playlist_AddSubtree(playlist_t *p_playlist,
playlist_item_t *p_item =
playlist_ItemGetByInput( p_playlist, p_input );
- assert( p_item != NULL );
+ if (!p_item)
+ /* the item may have been removed since the (pre-)parsing request */
+ return;
bool b_current = get_current_status_item( p_playlist ) == p_item;
bool b_autostart = var_GetBool( p_playlist, "playlist-autostart" );
--
2.19.0.rc1
More information about the vlc-devel
mailing list