diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 6506f182ee..9812caaa01 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -1938,7 +1938,12 @@ Zotero.Prefs = new function(){ // Register observer to handle pref changes this.register(); - + + // Unregister observer handling pref changes + if (Zotero.addShutdownListener) { + Zotero.addShutdownListener(this.unregister.bind(this)); + } + // Process pref version updates var fromVersion = this.get('prefVersion'); if (!fromVersion) {