From kde-commits Tue Jan 19 20:32:25 2010 From: Craig Drummond Date: Tue, 19 Jan 2010 20:32:25 +0000 To: kde-commits Subject: KDE/kdebase/workspace/kcontrol/kfontinst/kcmfontinst Message-Id: <1263933145.119741.11617.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=126393316330993 SVN commit 1077252 by craig: If style sets SH_ItemView_PaintAlternatingRowColorsForEmptyArea, then then idx.internalPointer will be null - so need to check for this. M +3 -3 GroupList.cpp --- trunk/KDE/kdebase/workspace/kcontrol/kfontinst/kcmfontinst/GroupList.cpp #1077251:1077252 @@ -750,12 +750,12 @@ CGroupListItem *grp=static_cast(idx.internalPointer()); QStyleOptionViewItem opt(option); - if(grp->isUnclassified()) + if(grp && grp->isUnclassified()) opt.rect.adjust(0, 0, 0, -1); QStyledItemDelegate::paint(painter, opt, idx); - if(grp->isUnclassified()) + if(grp && grp->isUnclassified()) { opt.rect.adjust(2, 0, -2, 1); painter->setPen(QApplication::palette().color(QPalette::Text)); @@ -769,7 +769,7 @@ CGroupListItem *grp=static_cast(idx.internalPointer()); - if(grp->isUnclassified()) + if(grp && grp->isUnclassified()) sz.setHeight(sz.height()+1); return sz; }