diff --git a/src/libtomahawk/Query.cpp b/src/libtomahawk/Query.cpp index bfa4a2f3d..7d3a34545 100644 --- a/src/libtomahawk/Query.cpp +++ b/src/libtomahawk/Query.cpp @@ -408,7 +408,10 @@ Query::resultSorter( const result_ptr& left, const result_ptr& right ) return !left->isPreview(); } - return left->resolvedBy()->weight() > right->resolvedBy()->weight(); + if ( left->resolvedBy() != nullptr && right->resolvedBy() != nullptr ) + { + return left->resolvedBy()->weight() > right->resolvedBy()->weight(); + } } if ( left->isPreview() != right->isPreview() )