From e416ed604b86bb023f87b761ac22d2fcbb33a5f0 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser <muesli@gmail.com> Date: Tue, 12 Aug 2014 20:18:06 +0200 Subject: [PATCH] * Prevent crash in TomahawkUtils::prepareStyleOption. --- src/libtomahawk/utils/TomahawkUtilsGui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libtomahawk/utils/TomahawkUtilsGui.cpp b/src/libtomahawk/utils/TomahawkUtilsGui.cpp index 3828bae23..c260fdbcb 100644 --- a/src/libtomahawk/utils/TomahawkUtilsGui.cpp +++ b/src/libtomahawk/utils/TomahawkUtilsGui.cpp @@ -754,7 +754,7 @@ prepareStyleOption( QStyleOptionViewItemV4* option, const QModelIndex& index, Pl else { float opacity = 0.0; - if ( !item->query()->results().isEmpty() && item->query()->results().first()->isOnline() ) + if ( item->query() && !item->query()->results().isEmpty() && item->query()->results().first()->isOnline() ) opacity = item->query()->results().first()->score(); opacity = qMax( (float)0.3, opacity );