Skip to content

Commit

Permalink
Fix segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaynexus committed Nov 17, 2019
1 parent f3fa0db commit 86efd92
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/qt/dogecash/topbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,15 @@ TopBar::TopBar(DogeCashGUI* _mainWindow, QWidget *parent) :
ui->pushButtonLock->setButtonText("Wallet Locked ");
ui->pushButtonLock->setButtonClassStyle("cssClass", "btn-check-status-lock");

setHDStatus(walletModel->hdEnabled());
ui->pushButtonHD->setButtonText("HD Enabled");
ui->pushButtonHD->setButtonClassStyle("cssClass", "btn-check-hd-enabled");

connect(ui->pushButtonQR, SIGNAL(clicked()), this, SLOT(onBtnReceiveClicked()));
connect(ui->btnQr, SIGNAL(clicked()), this, SLOT(onBtnReceiveClicked()));
connect(ui->pushButtonLock, SIGNAL(Mouse_Pressed()), this, SLOT(onBtnLockClicked()));
connect(ui->pushButtonTheme, SIGNAL(Mouse_Pressed()), this, SLOT(onThemeClicked()));
connect(ui->pushButtonFAQ, SIGNAL(Mouse_Pressed()), _mainWindow, SLOT(openFAQ()));
connect(ui->pushButtonColdStaking, SIGNAL(Mouse_Pressed()), this, SLOT(onColdStakingClicked()));
// Connect HD enabled state signal
connect(this, SIGNAL(hdEnabledStatusChanged(bool)), this, SLOT(setHDStatus(bool)));
}

void TopBar::onThemeClicked(){
Expand Down Expand Up @@ -470,10 +469,11 @@ void TopBar::loadWalletModel(){
SLOT(updateBalances(CAmount, CAmount, CAmount, CAmount, CAmount, CAmount, CAmount, CAmount, CAmount, CAmount, CAmount)));
connect(walletModel->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
connect(walletModel, &WalletModel::encryptionStatusChanged, this, &TopBar::refreshStatus);
// Connect HD enabled state signal
connect(this, SIGNAL(hdEnabledStatusChanged(bool)), this, SLOT(setHDStatus(bool)));
Q_EMIT hdEnabledStatusChanged(walletModel->hdEnabled());
// update the display unit, to not use the default ("DogeCash")
updateDisplayUnit();

refreshStatus();
onColdStakingClicked();

Expand All @@ -494,7 +494,7 @@ void TopBar::refreshStatus(){
// Check lock status
if (!this->walletModel)
return;

setHDStatus(walletModel->hdEnabled());
WalletModel::EncryptionStatus encStatus = walletModel->getEncryptionStatus();

switch (encStatus){
Expand Down

0 comments on commit 86efd92

Please sign in to comment.