diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js index 4f296cb46..5a3aa5ee6 100644 --- a/chrome/content/zotero/xpcom/search.js +++ b/chrome/content/zotero/xpcom/search.js @@ -829,6 +829,12 @@ Zotero.Search.prototype._buildQuery = function(){ // Search descendent collections if recursive search if (recursive){ var col = Zotero.Collections.get(condition['value']); + if (!col) { + var msg = "Collection " + condition['value'] + " specified in saved search doesn't exist"; + Zotero.debug(msg, 2); + Zotero.log(msg, 'warning', 'chrome://zotero/content/xpcom/search.js'); + continue; + } var descendents = col.getDescendents(false, 'collection'); if (descendents){ for (var k in descendents){