DB_driver's trans_complete exception fix
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 35ac8e8..05abd86 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -625,7 +625,7 @@
 				// if transactions are enabled. If we don't call this here
 				// the error message will trigger an exit, causing the
 				// transactions to remain in limbo.
-				$this->trans_complete();
+				$this->_trans_depth > 0 && $this->trans_complete();
 
 				// Display errors
 				return $this->display_error(array('Error Number: '.$error['code'], $error['message'], $sql));