@@ -151,9 +151,10 @@ static void ShowProgress(SplashScreen *splash, const std::string &title, int nPr
151151}
152152
153153#ifdef ENABLE_WALLET
154- static void ConnectWallet (SplashScreen *splash, CWallet* wallet)
154+ void SplashScreen:: ConnectWallet (CWallet* wallet)
155155{
156- wallet->ShowProgress .connect (boost::bind (ShowProgress, splash, _1, _2));
156+ wallet->ShowProgress .connect (boost::bind (ShowProgress, this , _1, _2));
157+ connectedWallets.push_back (wallet);
157158}
158159#endif
159160
@@ -163,7 +164,7 @@ void SplashScreen::subscribeToCoreSignals()
163164 uiInterface.InitMessage .connect (boost::bind (InitMessage, this , _1));
164165 uiInterface.ShowProgress .connect (boost::bind (ShowProgress, this , _1, _2));
165166#ifdef ENABLE_WALLET
166- uiInterface.LoadWallet .connect (boost::bind (ConnectWallet, this , _1));
167+ uiInterface.LoadWallet .connect (boost::bind (&SplashScreen:: ConnectWallet, this , _1));
167168#endif
168169}
169170
@@ -173,8 +174,9 @@ void SplashScreen::unsubscribeFromCoreSignals()
173174 uiInterface.InitMessage .disconnect (boost::bind (InitMessage, this , _1));
174175 uiInterface.ShowProgress .disconnect (boost::bind (ShowProgress, this , _1, _2));
175176#ifdef ENABLE_WALLET
176- if (pwalletMain)
177- pwalletMain->ShowProgress .disconnect (boost::bind (ShowProgress, this , _1, _2));
177+ Q_FOREACH (CWallet* const & pwallet, connectedWallets) {
178+ pwallet->ShowProgress .disconnect (boost::bind (ShowProgress, this , _1, _2));
179+ }
178180#endif
179181}
180182
0 commit comments