ensure the groups() list doesn't contain null pointer (could fix some bugs, but tendds to generate backtraces not directly obvious)

svn path=/trunk/KDE/kdelibs/; revision=1127890
This commit is contained in:
Marco Martin 2010-05-17 22:18:12 +00:00
parent 325d6a7c67
commit aca321d765

View File

@ -284,9 +284,11 @@ QList<ExtenderGroup*> Extender::groups() const
QList<ExtenderGroup*> result;
foreach (ExtenderItem *item, d->attachedExtenderItems) {
if (item->isGroup() && !result.contains(item->group())) {
if (item->group()) {
result.append(item->group());
}
}
}
return result;
}