1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-08 07:07:05 +02:00

Only update to valid Playlist index

This commit is contained in:
Uwe L. Korn
2014-05-28 17:34:25 +01:00
parent f0ea99fc71
commit 69fc54024f

View File

@@ -61,9 +61,11 @@ AlbumPlaylistInterface::~AlbumPlaylistInterface()
void void
AlbumPlaylistInterface::setCurrentIndex( qint64 index ) AlbumPlaylistInterface::setCurrentIndex( qint64 index )
{ {
PlaylistInterface::setCurrentIndex( index ); if ( index < m_queries.size() && !m_queries.at( index ).isNull() && m_queries.at( index )->results().size() > 0 ) {
PlaylistInterface::setCurrentIndex( index );
m_currentItem = m_queries.at( index )->results().first(); m_currentItem = m_queries.at( index )->results().first();
}
} }