Call activate before complete, to avoid accessing freed objects

This commit is contained in:
Simon Kornblith 2012-01-10 14:06:59 -05:00
parent 5c324134c6
commit f01ab3ffa4

View file

@ -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);
}