diff --git a/src/libtomahawk/playlist/treeproxymodel.cpp b/src/libtomahawk/playlist/treeproxymodel.cpp index 4dbd8e0c3..a8ffe3e7f 100644 --- a/src/libtomahawk/playlist/treeproxymodel.cpp +++ b/src/libtomahawk/playlist/treeproxymodel.cpp @@ -230,7 +230,7 @@ Tomahawk::result_ptr TreeProxyModel::currentItem() const { TreeModelItem* item = itemFromIndex( mapToSource( currentIndex() ) ); - if ( item && item->result()->isOnline() ) + if ( item && !item->result().isNull() && item->result()->isOnline() ) return item->result(); return Tomahawk::result_ptr(); } @@ -239,6 +239,9 @@ TreeProxyModel::currentItem() const QString TreeProxyModel::textForItem( TreeModelItem* item ) const { + if ( !item ) + return QString(); + if ( !item->artist().isNull() ) { return item->artist()->name();