1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-21 00:09:47 +01:00

TWK-934: Don't crash when checking TreeView for jump-to-track

This commit is contained in:
Leo Franchi 2012-06-15 08:56:30 +02:00
parent 2f6b08948a
commit b2becc6287

View File

@ -419,7 +419,7 @@ TreeView::onMenuTriggered( int action )
bool
TreeView::jumpToCurrentTrack()
{
if ( !m_proxyModel )
if ( !m_proxyModel || !m_proxyModel->sourceModel() )
return false;
scrollTo( m_proxyModel->currentIndex(), QAbstractItemView::PositionAtCenter );