diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 7dbe63ba8d..76471f6486 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -814,10 +814,10 @@ Components.utils.import("resource://gre/modules/Services.jsm"); Zotero.DB.closeDatabase().then(function() { // broadcast that DB lock has been released Zotero.IPC.broadcast("lockReleased"); - callback(); + if(callback) callback(); }); } else { - callback(); + if(callback) callback(); } } catch(e) { Zotero.debug(e);