Fixing potential NRE in transaction manager

This commit is contained in:
Sebastien Ros
2013-10-02 17:58:07 -07:00
parent 5e93dfa190
commit dfd6e0985e
+7 -3
View File
@@ -53,9 +53,13 @@ namespace Orchard.Data {
EnsureSession();
if (_cancelled) {
_transaction.Rollback();
_transaction.Dispose();
_transaction = null;
if (_transaction != null) {
_transaction.Rollback();
_transaction.Dispose();
_transaction = null;
}
_cancelled = false;
}
else {
if (_transaction != null) {