Commit 043553e7 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

qt4: Fix PLSelector when a discovery service fails to be created.

parent a569b096
......@@ -265,8 +265,6 @@ void PLSelector::setSource( QTreeWidgetItem *item )
if( !item || item == curItem )
return;
curItem = item;
bool b_ok;
int i_type = item->data( 0, TYPE_ROLE ).toInt( &b_ok );
if( !b_ok || i_type == CATEGORY_TYPE )
......@@ -279,7 +277,8 @@ void PLSelector::setSource( QTreeWidgetItem *item )
sd_loaded = playlist_IsServicesDiscoveryLoaded( THEPL, qtu( qs ) );
if( !sd_loaded )
{
playlist_ServicesDiscoveryAdd( THEPL, qtu( qs ) );
if ( playlist_ServicesDiscoveryAdd( THEPL, qtu( qs ) ) != VLC_SUCCESS )
return ;
services_discovery_descriptor_t *p_test = new services_discovery_descriptor_t;
playlist_ServicesDiscoveryControl( THEPL, qtu( qs ), SD_CMD_DESCRIPTOR, p_test );
......@@ -295,6 +294,8 @@ void PLSelector::setSource( QTreeWidgetItem *item )
}
#endif
curItem = item;
/* */
playlist_Lock( THEPL );
playlist_item_t *pl_item = NULL;
......
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