mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-17 19:37:09 +02:00
Defensive.
This commit is contained in:
@@ -627,6 +627,8 @@ void
|
|||||||
PlayableModel::clear()
|
PlayableModel::clear()
|
||||||
{
|
{
|
||||||
Q_D( PlayableModel );
|
Q_D( PlayableModel );
|
||||||
|
setCurrentIndex( QModelIndex() );
|
||||||
|
|
||||||
if ( rowCount( QModelIndex() ) )
|
if ( rowCount( QModelIndex() ) )
|
||||||
{
|
{
|
||||||
finishLoading();
|
finishLoading();
|
||||||
|
@@ -205,7 +205,7 @@ PlayableProxyModelPlaylistInterface::siblingIndex( int itemsAway, qint64 rootInd
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// random mode is disabled
|
// random mode is disabled
|
||||||
if ( rootIndex == -1 )
|
if ( rootIndex <= 0 )
|
||||||
{
|
{
|
||||||
idx = proxyModel->currentIndex();
|
idx = proxyModel->currentIndex();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user