Commit c1984233 authored by Rolf Eike Beer's avatar Rolf Eike Beer
Browse files

Don't crash on delete key if no key is selected

Looks like there is actually a way to trigger this. To find such strange things 
we have assertions ;)

BUG:156886

svn path=/trunk/KDE/kdeutils/kgpg/; revision=768036
parent 60243aa7
......@@ -2010,7 +2010,8 @@ void KeysManager::confirmdeletekey()
KgpgCore::KgpgItemType pt;
bool same;
QList<KGpgNode *> ndlist = iview->selectedNodes(&same, &pt);
Q_ASSERT(!ndlist.isEmpty());
if (ndlist.isEmpty())
return;
// do not delete a key currently edited in terminal
if (((pt == ITYPE_PUBLIC) || (pt == ITYPE_PAIR)) && (ndlist.at(0)->getId() == terminalkey) && (ndlist.count() == 1)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment