commit f01ab3ffa474d4bcd71f738f6cb322bd7c6ec207
parent 5c324134c636a3a3e0432f1d2f277a6bc2717c2a
Author: Simon Kornblith <simon@simonster.com>
Date: Tue, 10 Jan 2012 14:06:59 -0500
Call activate before complete, to avoid accessing freed objects
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git 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);
}