mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-17 19:37:09 +02:00
Fix crash on trying highlight a row if none has been hovered over yet
This commit is contained in:
@@ -467,9 +467,13 @@ PlaylistItemDelegate::resetHoverIndex()
|
||||
m_hoveringOver = QModelIndex();
|
||||
m_infoButtonRects.clear();
|
||||
|
||||
PlayableItem* item = m_model->sourceModel()->itemFromIndex( m_model->mapToSource( idx ) );
|
||||
QModelIndex itemIdx = m_model->mapToSource( idx );
|
||||
if ( itemIdx.isValid() )
|
||||
{
|
||||
PlayableItem* item = m_model->sourceModel()->itemFromIndex( itemIdx );
|
||||
if ( item )
|
||||
item->requestRepaint();
|
||||
}
|
||||
|
||||
emit updateIndex( idx );
|
||||
m_view->repaint();
|
||||
|
Reference in New Issue
Block a user