Search: be resilient against buggy search providers
If a search provider returns a meta without a name, don't crash constructing the actor. https://bugzilla.gnome.org/show_bug.cgi?id=745861
This commit is contained in:
parent
b0be6b8678
commit
8b5a44e119
@ -205,6 +205,13 @@ const SearchResultsBase = new Lang.Class({
|
||||
callback(false);
|
||||
return;
|
||||
}
|
||||
if (metas.some(function(meta) {
|
||||
return !meta.name || !meta.id;
|
||||
})) {
|
||||
log('Invalid result meta returned from search provider ' + this.provider.id);
|
||||
callback(false);
|
||||
return;
|
||||
}
|
||||
|
||||
metasNeeded.forEach(Lang.bind(this, function(resultId, i) {
|
||||
let meta = metas[i];
|
||||
|
Loading…
Reference in New Issue
Block a user