From 023e755eb651c536f6442a12155e2475677756d0 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 5 Dec 2006 16:50:47 +0000 Subject: [PATCH] Allow a DB.rollbackTransaction() even if a transaction isn't in progress --- chrome/content/zotero/xpcom/db.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js index 3e3b75caed..6936b2c5b6 100644 --- a/chrome/content/zotero/xpcom/db.js +++ b/chrome/content/zotero/xpcom/db.js @@ -320,6 +320,11 @@ Zotero.DB = new function(){ function rollbackTransaction(){ var db = _getDBConnection(); + if (!db.transactionInProgress) { + Zotero.debug("Transaction is not in progress in rollbackTransaction()", 2); + return; + } + if (_transactionNestingLevel){ _transactionNestingLevel--; _transactionRollback = true;