From 708d585b96a5296194e9c5d8d1e58db5b001fb4a Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 20 Aug 2014 13:35:49 +0200 Subject: [PATCH] * Prevent crashes in PlayableProxyModelPlaylistInterface. --- .../playlist/PlayableProxyModelPlaylistInterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.cpp b/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.cpp index 58d9bf077..ae44b0356 100644 --- a/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.cpp +++ b/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.cpp @@ -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()