summaryrefslogtreecommitdiff
path: root/src/settings
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2012-06-01 13:14:48 +0200
committerMontel Laurent <montel@kde.org>2012-06-01 13:14:48 +0200
commit0ee573f7d20a6d4be35757573d73c1f7aed6e121 (patch)
treeaacb4380af09a3b06efcdc8650faeb8707df1763 /src/settings
parentrekonqinfo css cleanup (diff)
downloadrekonq-0ee573f7d20a6d4be35757573d73c1f7aed6e121.tar.xz
Fix crash when item is not selected (for example list is empty)
Diffstat (limited to 'src/settings')
-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);