diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index c7f0092df97..9fea2c151e9 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -287,6 +287,7 @@ int main(int argc, char *argv[]) #endif app.exec(); + window.hide(); guiref = 0; } Shutdown(NULL); diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 8344a653d51..0a085f5745e 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -153,14 +153,20 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QListcs_wallet) { - if (!wallet->mapAddressBook.count(strAddress)) - wallet->SetAddressBookName(strAddress, rcp.label.toStdString()); + std::map::iterator mi = wallet->mapAddressBook.find(strAddress); + + // Check if we have a new address or an updated label + if (mi == wallet->mapAddressBook.end() || mi->second != strLabel) + { + wallet->SetAddressBookName(strAddress, strLabel); + } } }