aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsentry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/sendcoinsentry.cpp')
-rw-r--r--src/qt/sendcoinsentry.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp
index caffaaeff2..c8242d8352 100644
--- a/src/qt/sendcoinsentry.cpp
+++ b/src/qt/sendcoinsentry.cpp
@@ -59,9 +59,11 @@ void SendCoinsEntry::on_payTo_textChanged(const QString &address)
{
if(!model)
return;
- // Fill in label from address book, if no label is filled in yet
- if(ui->addAsLabel->text().isEmpty())
- ui->addAsLabel->setText(model->getAddressTableModel()->labelForAddress(address));}
+ // Fill in label from address book, if address has an associated label
+ QString associatedLabel = model->getAddressTableModel()->labelForAddress(address);
+ if(!associatedLabel.isEmpty())
+ ui->addAsLabel->setText(associatedLabel);
+}
void SendCoinsEntry::setModel(WalletModel *model)
{