@@ -151,9 +151,10 @@ static void ShowProgress(SplashScreen *splash, const std::string &title, int nPr
151
151
}
152
152
153
153
#ifdef ENABLE_WALLET
154
- static void ConnectWallet (SplashScreen *splash, CWallet* wallet)
154
+ void SplashScreen:: ConnectWallet (CWallet* wallet)
155
155
{
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);
157
158
}
158
159
#endif
159
160
@@ -163,7 +164,7 @@ void SplashScreen::subscribeToCoreSignals()
163
164
uiInterface.InitMessage .connect (boost::bind (InitMessage, this , _1));
164
165
uiInterface.ShowProgress .connect (boost::bind (ShowProgress, this , _1, _2));
165
166
#ifdef ENABLE_WALLET
166
- uiInterface.LoadWallet .connect (boost::bind (ConnectWallet, this , _1));
167
+ uiInterface.LoadWallet .connect (boost::bind (&SplashScreen:: ConnectWallet, this , _1));
167
168
#endif
168
169
}
169
170
@@ -173,8 +174,9 @@ void SplashScreen::unsubscribeFromCoreSignals()
173
174
uiInterface.InitMessage .disconnect (boost::bind (InitMessage, this , _1));
174
175
uiInterface.ShowProgress .disconnect (boost::bind (ShowProgress, this , _1, _2));
175
176
#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
+ }
178
180
#endif
179
181
}
180
182
0 commit comments