mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-02 18:26:43 +00:00
fix npe for new wallets
This commit is contained in:
parent
eab42c0f05
commit
2eedd2290c
1 changed files with 5 additions and 3 deletions
|
@ -143,9 +143,11 @@ public class Wallet extends Persistable {
|
|||
int index = -1;
|
||||
|
||||
for(Keystore keystore : getKeystores()) {
|
||||
int keystoreAccount = getScriptType().getAccount(keystore.getKeyDerivation().getDerivationPath());
|
||||
if(keystoreAccount != -1 && (index == -1 || keystoreAccount == index)) {
|
||||
index = keystoreAccount;
|
||||
if(keystore.getKeyDerivation() != null) {
|
||||
int keystoreAccount = getScriptType().getAccount(keystore.getKeyDerivation().getDerivationPath());
|
||||
if(keystoreAccount != -1 && (index == -1 || keystoreAccount == index)) {
|
||||
index = keystoreAccount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue