don't access an invalid group

BUG:176595

svn path=/trunk/KDE/kdelibs/; revision=891029
This commit is contained in:
Aaron J. Seigo 2008-12-01 00:28:50 +00:00
parent bd1a648215
commit c4d63ac944

View File

@ -131,10 +131,11 @@ ServiceJob *Service::startOperationCall(const KConfigGroup &description, QObject
{
// TODO: nested groups?
ServiceJob *job = 0;
QString op = description.name();
QString op = description.isValid() ? description.name() : QString();
if (!d->config) {
kDebug() << "No valid operations scheme has been registered";
} else if (d->config->hasGroup(op)) {
} else if (!op.isEmpty() && d->config->hasGroup(op)) {
if (d->disabledOperations.contains(op)) {
kDebug() << "Operation" << op << "is disabled";
} else {