diff options
author | Montel Laurent <montel@kde.org> | 2012-06-01 13:14:48 +0200 |
---|---|---|
committer | Montel Laurent <montel@kde.org> | 2012-06-01 13:14:48 +0200 |
commit | 0ee573f7d20a6d4be35757573d73c1f7aed6e121 (patch) | |
tree | aacb4380af09a3b06efcdc8650faeb8707df1763 | |
parent | rekonqinfo css cleanup (diff) | |
download | rekonq-0ee573f7d20a6d4be35757573d73c1f7aed6e121.tar.xz |
Fix crash when item is not selected (for example list is empty)
-rw-r--r-- | src/settings/passexceptionswidget.cpp | 5 |
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); |