save a write lock and return false (as we don't actually add anything) on addMatches with null items
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=772448
This commit is contained in:
parent
253f892b99
commit
293a4dc07d
@ -280,6 +280,13 @@ bool SearchContext::addMatches( const QString& term, const QList<SearchMatch *>
|
||||
if (searchTerm() != term) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (exactMatches.isEmpty() &&
|
||||
possibleMatches.isEmpty() &&
|
||||
informationalMatches.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
d->lockForWrite();
|
||||
d->exact << exactMatches;
|
||||
d->possible << possibleMatches;
|
||||
|
Loading…
Reference in New Issue
Block a user