]> git.ktnx.net Git - mobile-ledger.git/commitdiff
try{} needs to be immediately after incrementing the background task count
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 7 Mar 2019 04:58:43 +0000 (06:58 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 7 Mar 2019 04:58:43 +0000 (06:58 +0200)
app/src/main/java/net/ktnx/mobileledger/async/UpdateAccountsTask.java

index cff03a2819dd3107a499b8d138c5677e0cd8a2f5..64a5559a5ccefa1179b69f19ee0209b2489fdb2c 100644 (file)
@@ -31,9 +31,9 @@ import java.util.ArrayList;
 public class UpdateAccountsTask extends AsyncTask<Void, Void, ArrayList<LedgerAccount>> {
     protected ArrayList<LedgerAccount> doInBackground(Void... params) {
         Data.backgroundTaskCount.incrementAndGet();
-        String profileUUID = Data.profile.get().getUuid();
-        boolean onlyStarred = Data.optShowOnlyStarred.get();
         try {
+            String profileUUID = Data.profile.get().getUuid();
+            boolean onlyStarred = Data.optShowOnlyStarred.get();
             ArrayList<LedgerAccount> newList = new ArrayList<>();
 
             String sql = "SELECT name, hidden FROM accounts WHERE profile = ?";