Skip to content

Commit b8316c8

Browse files
one more crash fixed (#1721)
1 parent ad711a1 commit b8316c8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/qt/receivecoinsdialog.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@ void ReceiveCoinsDialog::setModel(WalletModel *_model)
122122
tableView->horizontalHeader()->setMinimumSectionSize(23);
123123
tableView->horizontalHeader()->setStretchLastSection(true);
124124

125+
auto wallet = _model->getWallet();
126+
if (!wallet || !wallet->sparkWallet) {
127+
ui->addressTypeCombobox->removeItem(0);
128+
ui->reuseAddress->show();
129+
ui->createSparkNameButton->setVisible(false);
130+
}
131+
125132
connect(tableView->selectionModel(), &QItemSelectionModel::selectionChanged,
126133
this, &ReceiveCoinsDialog::recentRequestsView_selectionChanged);
127134
}
@@ -327,7 +334,7 @@ void ReceiveCoinsDialog::copyAmount()
327334

328335
void ReceiveCoinsDialog::displayCheckBox(int idx)
329336
{
330-
if(idx==0){
337+
if(ui->addressTypeCombobox->currentText() == "Spark"){
331338
ui->reuseAddress->hide();
332339
ui->createSparkNameButton->setVisible(true);
333340
} else {

0 commit comments

Comments
 (0)