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

* Prevent crashes in PlayableProxyModelPlaylistInterface.

This commit is contained in:
Christian Muehlhaeuser
2014-08-20 13:35:49 +02:00
parent a6ed5cfc42
commit 708d585b96

View File

@@ -181,9 +181,9 @@ PlayableProxyModelPlaylistInterface::siblingIndex( int itemsAway, qint64 rootInd
item = proxyModel->itemFromIndex( proxyModel->mapToSource( idx ) );
}
while ( safetyCounter < proxyModel->rowCount() &&
( !item || !item->query()->playable() || m_shuffleHistory.contains( item->query() ) ) );
( !item || !item->query() || !item->query()->playable() || m_shuffleHistory.contains( item->query() ) ) );
if ( item && item->query()->playable() )
if ( item && item->query() && item->query()->playable() )
{
m_shuffleCache = idx;
tDebug( LOGVERBOSE ) << "Next shuffled PlaylistItem cached:" << item->query()->toString() << item->query()->results().at( 0 )->url()