From 4fb708778a664a859924c13dcb8b36b5df9ec53c Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 23 Sep 2010 04:57:36 +0000 Subject: [PATCH] fix hidden browser creation in Z standalone --- chrome/content/zotero/xpcom/zotero.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index eb006167c..dd5429854 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -2617,6 +2617,11 @@ Zotero.Browser = new function() { var win = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator) .getMostRecentWindow("navigator:browser"); + if(!win) { + var win = Components.classes["@mozilla.org/appshell/window-mediator;1"] + .getService(Components.interfaces.nsIWindowWatcher) + .activeWindow; + } } // Create a hidden browser