1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-07 06:36:55 +02: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 bool
TreeView::jumpToCurrentTrack() TreeView::jumpToCurrentTrack()
{ {
if ( !m_proxyModel ) if ( !m_proxyModel || !m_proxyModel->sourceModel() )
return false; return false;
scrollTo( m_proxyModel->currentIndex(), QAbstractItemView::PositionAtCenter ); scrollTo( m_proxyModel->currentIndex(), QAbstractItemView::PositionAtCenter );