mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Guard against null source
This commit is contained in:
@@ -400,7 +400,7 @@ SourceDelegate::editorEvent ( QEvent* event, QAbstractItemModel* model, const QS
|
|||||||
{
|
{
|
||||||
CollectionItem* colItem = qobject_cast< CollectionItem* >( index.data( SourcesModel::SourceTreeItemRole ).value< SourceTreeItem* >() );
|
CollectionItem* colItem = qobject_cast< CollectionItem* >( index.data( SourcesModel::SourceTreeItemRole ).value< SourceTreeItem* >() );
|
||||||
Q_ASSERT( colItem );
|
Q_ASSERT( colItem );
|
||||||
if ( !colItem->source()->currentTrack().isNull() )
|
if ( !colItem->source().isNull() && !colItem->source()->currentTrack().isNull() )
|
||||||
{
|
{
|
||||||
QMouseEvent* ev = static_cast< QMouseEvent* >( event );
|
QMouseEvent* ev = static_cast< QMouseEvent* >( event );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user