1
0
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:
Uwe L. Korn
2013-07-08 19:11:44 +02:00
parent 872810791a
commit 5ef778fd85

View File

@@ -467,9 +467,13 @@ PlaylistItemDelegate::resetHoverIndex()
m_hoveringOver = QModelIndex(); m_hoveringOver = QModelIndex();
m_infoButtonRects.clear(); 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 ) if ( item )
item->requestRepaint(); item->requestRepaint();
}
emit updateIndex( idx ); emit updateIndex( idx );
m_view->repaint(); m_view->repaint();