diff --git a/src/libtomahawk/playlist/PlayableProxyModel.cpp b/src/libtomahawk/playlist/PlayableProxyModel.cpp index aeb89c1a4..02a7a9a0e 100644 --- a/src/libtomahawk/playlist/PlayableProxyModel.cpp +++ b/src/libtomahawk/playlist/PlayableProxyModel.cpp @@ -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() ); }