don't crash when a runner that doesn't exist is requested
BUGS:170989,177162 svn path=/trunk/KDE/kdelibs/; revision=894424
This commit is contained in:
parent
f40bc9cf36
commit
2d6431cafa
@ -346,9 +346,13 @@ AbstractRunner *RunnerManager::runner(const QString &name) const
|
||||
d->loadRunners();
|
||||
}
|
||||
|
||||
if (d->runners.contains(name)) {
|
||||
return d->runners.value(name);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
RunnerContext *RunnerManager::searchContext() const
|
||||
{
|
||||
return &d->context;
|
||||
@ -428,7 +432,10 @@ void RunnerManager::launchQuery(const QString &term, const QString &runnerName)
|
||||
|
||||
//if the name is not empty we will launch only the specified runner
|
||||
if (!runnerName.isEmpty()) {
|
||||
runable.append(runner(runnerName));
|
||||
AbstractRunner *r = runner(runnerName);
|
||||
if (r) {
|
||||
runable.append(r);
|
||||
}
|
||||
} else {
|
||||
runable = d->runners.values();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user