From f01ab3ffa474d4bcd71f738f6cb322bd7c6ec207 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 10 Jan 2012 14:06:59 -0500 Subject: [PATCH] Call activate before complete, to avoid accessing freed objects --- chrome/content/zotero/xpcom/integration.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 271b22557b..7afda45a5c 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -387,13 +387,12 @@ Zotero.Integration = new function() { if(doc) { try { doc.cleanup(); + doc.activate(); // Call complete function if one exists if(doc.wrappedJSObject && doc.wrappedJSObject.complete) { doc.wrappedJSObject.complete(); } - - doc.activate(); } catch(e) { Zotero.logError(e); }