Commit e70940c3 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: selector, prevent some podcast crashes

parent ecbba65a
...@@ -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>
...@@ -445,6 +446,8 @@ void PLSelector::plItemAdded( int item, int parent ) ...@@ -445,6 +446,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++ )
{ {
...@@ -462,6 +465,8 @@ void PLSelector::plItemRemoved( int id ) ...@@ -462,6 +465,8 @@ void PLSelector::plItemRemoved( int id )
void PLSelector::inputItemUpdate( input_item_t *arg ) void PLSelector::inputItemUpdate( input_item_t *arg )
{ {
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++ )
{ {
...@@ -480,6 +485,8 @@ void PLSelector::inputItemUpdate( input_item_t *arg ) ...@@ -480,6 +485,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