]> git.sesse.net Git - vlc/commitdiff
ncurses: lock playlist in open box
authorRafaël Carré <rafael.carre@gmail.com>
Mon, 3 Aug 2009 19:59:25 +0000 (21:59 +0200)
committerRafaël Carré <rafael.carre@gmail.com>
Mon, 3 Aug 2009 19:59:25 +0000 (21:59 +0200)
modules/gui/ncurses.c

index 0421a5ca3a7d3aa8c489afcfaf8c33291a96eef1..8bf7d8f2e161fee8bf402f6c023c64893fab58f4 100644 (file)
@@ -954,6 +954,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
                 {
                     playlist_item_t *p_parent = p_sys->p_node;
 
+                    PL_LOCK;
                     if( !p_parent )
                     p_parent = playlist_CurrentPlayingItem(p_playlist) ? playlist_CurrentPlayingItem(p_playlist)->p_parent : NULL;
                     if( !p_parent )
@@ -961,6 +962,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
 
                     while( p_parent->p_parent && p_parent->p_parent->p_parent )
                         p_parent = p_parent->p_parent;
+                    PL_UNLOCK;
 
                     playlist_Add( p_playlist, p_sys->psz_open_chain, NULL,
                                   PLAYLIST_APPEND|PLAYLIST_GO, PLAYLIST_END,