TreeMove() does not handle correctly the case when moving items into a node from outside. This patch fixes it by adding a simple check whether the item being moved already belongs to the node inside which it's requested new position resides.<br>
---<br> src/playlist/item.c | 2 +-<br> 1 files changed, 1 insertions(+), 1 deletions(-)<br><br>diff --git a/src/playlist/item.c b/src/playlist/item.c<br>index b95fc42..8b064f2 100644<br>--- a/src/playlist/item.c<br>+++ b/src/playlist/item.c<br>
@@ -691,7 +691,7 @@ static int TreeMove( playlist_t *p_playlist, playlist_item_t *p_item,<br> * down of the playlist. So when removing the element we have<br> * to change the position as we loose one element<br>
*/<br>- if( j < i_newpos )<br>+ if( p_item->p_parent == p_node && j < i_newpos )<br> i_newpos--;<br> <br> /* Attach to new parent */<br>-- <br><br>