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:
@@ -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() );
|
||||
}
|
||||
|
Reference in New Issue
Block a user