]> git.sesse.net Git - vlc/commitdiff
Fix popupSave/Stream deadlock
authorFabio Ritrovato <exsephiroth87@gmail.com>
Fri, 13 Mar 2009 22:13:46 +0000 (23:13 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Sun, 15 Mar 2009 19:47:57 +0000 (20:47 +0100)
Signed-off-by: Rémi Duraffort <ivoire@videolan.org>
modules/gui/qt4/components/playlist/playlist_model.cpp

index 5f35fc63d27618c1e3f4d1f78773627d8f355562..3dfaf18b08cec96c5cbec7764895a24ed9ad3958 100644 (file)
@@ -394,20 +394,18 @@ QStringList PLModel::selectedURIs()
         PL_LOCK;
         PLItem *item = static_cast<PLItem*>
                     (current_selection[i].internalPointer());
-        if( !item )
-            continue;
-
-        input_item_t *p_item = NULL;
-        if( !p_item )
-            continue;
-
-        char *psz = input_item_GetURI( p_item );
-        if( !psz )
-            continue;
-        else
+        if( item )
         {
-            lst.append( QString( psz ) );
-            free( psz );
+            playlist_item_t *p_item = playlist_ItemGetById( p_playlist, item->i_id );
+            if( p_item )
+            {
+                char *psz = input_item_GetURI( p_item->p_input );
+                if( psz )
+                {
+                    lst.append( QString( psz ) );
+                    free( psz );
+                }
+            }
         }
         PL_UNLOCK;
     }