diff options
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/sendcoinsdialog.cpp | 15 | ||||
-rw-r--r-- | src/qt/signverifymessagedialog.cpp | 3 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 09d83b1a29..9086f6614e 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -39,16 +39,17 @@ void SendCoinsDialog::setModel(WalletModel *model) { this->model = model; - for(int i = 0; i < ui->entries->count(); ++i) + if(model && model->getOptionsModel()) { - SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget()); - if(entry) + for(int i = 0; i < ui->entries->count(); ++i) { - entry->setModel(model); + SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget()); + if(entry) + { + entry->setModel(model); + } } - } - if(model && model->getOptionsModel()) - { + setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance()); connect(model, SIGNAL(balanceChanged(qint64, qint64, qint64)), this, SLOT(setBalance(qint64, qint64, qint64))); connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp index 9118770f4c..1e9c84fe1a 100644 --- a/src/qt/signverifymessagedialog.cpp +++ b/src/qt/signverifymessagedialog.cpp @@ -102,6 +102,9 @@ void SignVerifyMessageDialog::on_pasteButton_SM_clicked() void SignVerifyMessageDialog::on_signMessageButton_SM_clicked() { + if (!model) + return; + /* Clear old signature to ensure users don't get confused on error with an old signature displayed */ ui->signatureOut_SM->clear(); |