From 47c4f686e861003ffdf04b9cdef3c6e7925b79cd Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 3 May 2012 15:40:53 -0400 Subject: [PATCH] Fix some issues with corrupted field codes --- chrome/content/zotero/xpcom/integration.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 2777dbe3e..2f2d54dac 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1323,9 +1323,13 @@ Zotero.Integration.Fields.prototype._showCorruptFieldError = function(e, field, // Display reselect edit citation dialog var me = this; var oldWindow = Zotero.Integration.currentWindow; + var oldProgressCallback = me.progressCallback; this.addEditCitation(field, function() { - Zotero.Integration.currentWindow.close(); + if(Zotero.Integration.currentWindow && !Zotero.Integration.currentWindow.closed) { + Zotero.Integration.currentWindow.close(); + } Zotero.Integration.currentWindow = oldWindow; + me.progressCallback = oldProgressCallback; me.updateSession(callback, errorCallback); }); return false;