vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <[email protected]> | Mon Sep 10 17:09:02 2012 +0200| [e70940c36006b3f7c98567ea02557891c89e16ed] | committer: Jean-Baptiste Kempf
Qt: selector, prevent some podcast crashes > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=e70940c36006b3f7c98567ea02557891c89e16ed --- modules/gui/qt4/components/playlist/selector.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/gui/qt4/components/playlist/selector.cpp b/modules/gui/qt4/components/playlist/selector.cpp index 3bce22c..1bdf8df 100644 --- a/modules/gui/qt4/components/playlist/selector.cpp +++ b/modules/gui/qt4/components/playlist/selector.cpp @@ -41,6 +41,7 @@ #include <QPainter> #include <QPalette> #include <QScrollBar> +#include <assert.h> #include <vlc_playlist.h> #include <vlc_services_discovery.h> @@ -445,6 +446,8 @@ void PLSelector::plItemAdded( int item, int parent ) void PLSelector::plItemRemoved( int id ) { + if( !podcastsParent ) return; + int c = podcastsParent->childCount(); for( int i = 0; i < c; i++ ) { @@ -462,6 +465,8 @@ void PLSelector::plItemRemoved( int id ) void PLSelector::inputItemUpdate( input_item_t *arg ) { + if( !podcastsParent ) return; + int c = podcastsParent->childCount(); for( int i = 0; i < c; i++ ) { @@ -480,6 +485,8 @@ void PLSelector::inputItemUpdate( input_item_t *arg ) void PLSelector::podcastAdd( PLSelItem * ) { + assert( podcastsParent ); + bool ok; QString url = QInputDialog::getText( this, qtr( "Subscribe" ), qtr( "Enter URL of the podcast to subscribe to:" ), _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
