From 053e374e42ee41284086e2f102b920eb99f50871 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 13 Jan 2017 18:02:33 +0400 Subject: [PATCH] Merge bug fixes (#1260) * Fix for incorrect locking in GetPubKey() (keystore.cpp) * Fix Cmd-Q / Menu Quit shutdown on OSX * Addition of ImmatureCreditCached to MarkDirty() To protect against possible invalidation and to bring conformity to the code. --- src/keystore.cpp | 1 + src/qt/dash.cpp | 1 + src/wallet/wallet.h | 1 + 3 files changed, 3 insertions(+) diff --git a/src/keystore.cpp b/src/keystore.cpp index cc8a57336..d568a7435 100644 --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -19,6 +19,7 @@ bool CBasicKeyStore::GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) con { CKey key; if (!GetKey(address, key)) { + LOCK(cs_KeyStore); WatchKeyMap::const_iterator it = mapWatchKeys.find(address); if (it != mapWatchKeys.end()) { vchPubKeyOut = it->second; diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp index 68cb533e9..bcdf80d40 100644 --- a/src/qt/dash.cpp +++ b/src/qt/dash.cpp @@ -411,6 +411,7 @@ void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle) splash->setAttribute(Qt::WA_DeleteOnClose); splash->show(); connect(this, SIGNAL(splashFinished(QWidget*)), splash, SLOT(slotFinish(QWidget*))); + connect(this, SIGNAL(requestedShutdown()), splash, SLOT(close())); } void BitcoinApplication::startThread() diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 7eede377d..2cb0a0d49 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -398,6 +398,7 @@ public: { fCreditCached = false; fAvailableCreditCached = false; + fImmatureCreditCached = false; fAnonymizedCreditCached = false; fDenomUnconfCreditCached = false; fDenomConfCreditCached = false;