mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Fix crashes when a wallet is locked and GetReservedKey() is called
This commit is contained in:
parent
9cd22ab862
commit
0d7b28e52e
@ -1320,7 +1320,10 @@ vector<unsigned char> CReserveKey::GetReservedKey()
|
||||
{
|
||||
CKeyPool keypool;
|
||||
pwallet->ReserveKeyFromKeyPool(nIndex, keypool);
|
||||
vchPubKey = keypool.vchPubKey;
|
||||
if (nIndex != -1)
|
||||
vchPubKey = keypool.vchPubKey;
|
||||
else
|
||||
vchPubKey = vchDefaultKey;
|
||||
}
|
||||
assert(!vchPubKey.empty());
|
||||
return vchPubKey;
|
||||
|
Loading…
Reference in New Issue
Block a user