aboutsummaryrefslogtreecommitdiff
path: root/src/qt/addressbookpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/addressbookpage.cpp')
-rw-r--r--src/qt/addressbookpage.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp
index cc3afb2655..abda6c7981 100644
--- a/src/qt/addressbookpage.cpp
+++ b/src/qt/addressbookpage.cpp
@@ -158,6 +158,9 @@ void AddressBookPage::onCopyLabelAction()
void AddressBookPage::onEditAction()
{
+ if(!model)
+ return;
+
if(!ui->tableView->selectionModel())
return;
QModelIndexList indexes = ui->tableView->selectionModel()->selectedRows();
@@ -165,9 +168,9 @@ void AddressBookPage::onEditAction()
return;
EditAddressDialog dlg(
- tab == SendingTab ?
- EditAddressDialog::EditSendingAddress :
- EditAddressDialog::EditReceivingAddress);
+ tab == SendingTab ?
+ EditAddressDialog::EditSendingAddress :
+ EditAddressDialog::EditReceivingAddress, this);
dlg.setModel(model);
QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0));
dlg.loadRow(origIndex.row());
@@ -180,9 +183,9 @@ void AddressBookPage::on_newAddress_clicked()
return;
EditAddressDialog dlg(
- tab == SendingTab ?
- EditAddressDialog::NewSendingAddress :
- EditAddressDialog::NewReceivingAddress, this);
+ tab == SendingTab ?
+ EditAddressDialog::NewSendingAddress :
+ EditAddressDialog::NewReceivingAddress, this);
dlg.setModel(model);
if(dlg.exec())
{