Commit 4cd019b1 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: selector, prevent some podcast crashes

parent a2df1797
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <QPainter> #include <QPainter>
#include <QPalette> #include <QPalette>
#include <QScrollBar> #include <QScrollBar>
#include <assert.h>
#include <vlc_playlist.h> #include <vlc_playlist.h>
#include <vlc_services_discovery.h> #include <vlc_services_discovery.h>
...@@ -457,6 +458,8 @@ void PLSelector::plItemAdded( int item, int parent ) ...@@ -457,6 +458,8 @@ void PLSelector::plItemAdded( int item, int parent )
void PLSelector::plItemRemoved( int id ) void PLSelector::plItemRemoved( int id )
{ {
if( !podcastsParent ) return;
int c = podcastsParent->childCount(); int c = podcastsParent->childCount();
for( int i = 0; i < c; i++ ) for( int i = 0; i < c; i++ )
{ {
...@@ -495,6 +498,8 @@ void PLSelector::inputItemUpdate( input_item_t *arg ) ...@@ -495,6 +498,8 @@ void PLSelector::inputItemUpdate( input_item_t *arg )
void PLSelector::podcastAdd( PLSelItem * ) void PLSelector::podcastAdd( PLSelItem * )
{ {
assert( podcastsParent );
bool ok; bool ok;
QString url = QInputDialog::getText( this, qtr( "Subscribe" ), QString url = QInputDialog::getText( this, qtr( "Subscribe" ),
qtr( "Enter URL of the podcast to subscribe to:" ), qtr( "Enter URL of the podcast to subscribe to:" ),
......
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