1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 07:36:48 +02:00

Don't crash trying to access unknown header style.

This commit is contained in:
Christian Muehlhaeuser
2015-06-19 18:44:47 +02:00
parent 5c2e384d44
commit a8c413ee5a

View File

@@ -585,6 +585,11 @@ PlayableProxyModel::lessThan( const QModelIndex& left, const QModelIndex& right
if ( p1->query() && p2->query() )
{
if ( !m_headerStyle.contains( m_style ) || left.column() >= m_headerStyle[ m_style ].count() )
{
return lessThan( left.column(), p1->query(), p2->query() );
}
PlayableModel::Columns col = m_headerStyle[ m_style ].at( left.column() );
return lessThan( col, p1->query(), p2->query() );
}