]> git.ktnx.net Git - mobile-ledger.git/commitdiff
assert there is no transaction running
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 7 Dec 2018 05:56:17 +0000 (05:56 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 7 Dec 2018 05:56:17 +0000 (05:56 +0000)
app/src/main/java/net/ktnx/mobileledger/RetrieveAccountsTask.java

index b3ad57784962577c78f88fc3f8ffe1838f6904cd..f1511f8051dc4fb4ee71eba7f98f49d65f0d295a 100644 (file)
@@ -39,6 +39,8 @@ abstract public class RetrieveAccountsTask extends android.os.AsyncTask<SQLiteDa
                     throw new IOException(String.valueOf(R.string.err_http_error));
                 }
                 else {
+                    if (db.inTransaction()) throw new AssertionError();
+
                     db.beginTransaction();
 
                     try {