From 9c6db3a6ea30b5d72444363e9b70d11216b61ce7 Mon Sep 17 00:00:00 2001 From: hvarona Date: Sun, 11 Nov 2018 22:26:34 -0400 Subject: [PATCH] fix calculate uri --- .../cy/agorise/crystalwallet/manager/GeneralAccountManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/manager/GeneralAccountManager.java b/app/src/main/java/cy/agorise/crystalwallet/manager/GeneralAccountManager.java index fd56ef0..3b5a5c8 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/manager/GeneralAccountManager.java +++ b/app/src/main/java/cy/agorise/crystalwallet/manager/GeneralAccountManager.java @@ -500,7 +500,7 @@ public class GeneralAccountManager implements CryptoAccountManager, CryptoNetInf CrystalDatabase db = CrystalDatabase.getAppDatabase(request.getContext()); long index = db.bitcoinAddressDao().getLastExternalAddress(request.getAccount().getId()); BitcoinAddress address = db.bitcoinAddressDao().getExternalByIndex(index); - if(db.bitcoinTransactionDao().getGtxIOByAddress(address.getAddress()).size()<=0){ + if(address != null && db.bitcoinTransactionDao().getGtxIOByAddress(address.getAddress()).size()<=0){ uri.append(address.getAddress()); }else { index++;