summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/settings/passexceptionswidget.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/settings/passexceptionswidget.cpp b/src/settings/passexceptionswidget.cpp
index feee4d88..bf705723 100644
--- a/src/settings/passexceptionswidget.cpp
+++ b/src/settings/passexceptionswidget.cpp
@@ -53,7 +53,10 @@ PassExWidget::PassExWidget(QWidget *parent)
void PassExWidget::removeOne()
{
- QString item = listWidget->takeItem(listWidget->currentRow())->text();
+ const int currentRow(listWidget->currentRow());
+ if(currentRow==-1)
+ return;
+ QString item = listWidget->takeItem(currentRow)->text();
QStringList exList = ReKonfig::walletBlackList();
exList.removeOne(item);