Browse Source

qt: protect SetAddressBook with cs_wallet lock everywhere

0.10
Wladimir J. van der Laan 11 years ago
parent
commit
28352af060
  1. 1
      src/qt/paymentserver.cpp

1
src/qt/paymentserver.cpp

@ -548,6 +548,7 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
else { else {
CPubKey newKey; CPubKey newKey;
if (wallet->GetKeyFromPool(newKey)) { if (wallet->GetKeyFromPool(newKey)) {
LOCK(wallet->cs_wallet); // SetAddressBook
CKeyID keyID = newKey.GetID(); CKeyID keyID = newKey.GetID();
wallet->SetAddressBook(keyID, strAccount, "refund"); wallet->SetAddressBook(keyID, strAccount, "refund");

Loading…
Cancel
Save