diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js index f19e698ab..43e8fe816 100644 --- a/chrome/content/zotero/xpcom/http.js +++ b/chrome/content/zotero/xpcom/http.js @@ -533,8 +533,9 @@ Zotero.HTTP = new function() { * @inner */ var onLoad = function() { - var doc = hiddenBrowser.contentDocument, - url = doc.location.href.toString(); + var doc = hiddenBrowser.contentDocument; + if(!doc) return; + var url = doc.location.href.toString(); if(url == "about:blank") return; if(doc.readyState === "loading" && firedLoadEvent < 120) { // Try again in a second