From 944827c48c8ee6c4cf31c57207dc1f0d790f913e Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 27 Jan 2016 15:01:45 -0800 Subject: [PATCH] only use resolvers to compare if there are resolvers tied to results --- src/libtomahawk/Query.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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() )