1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 15:59:42 +01:00

* Prevent crash in TomahawkUtils::prepareStyleOption.

This commit is contained in:
Christian Muehlhaeuser 2014-08-12 20:18:06 +02:00
parent 23809d6f2f
commit e416ed604b

View File

@ -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 );