Commit 3e7bb9f9 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix don't add item when rule is not valid

parent f24c2002
......@@ -124,9 +124,9 @@ void DKIMManageRulesWidget::addRule()
{
QPointer<DKIMRuleDialog> dlg = new DKIMRuleDialog(this);
if (dlg->exec()) {
DKIMManageRulesWidgetItem *item = new DKIMManageRulesWidgetItem(mTreeWidget);
const MessageViewer::DKIMRule rule = dlg->rule();
if (rule.isValid()) {
DKIMManageRulesWidgetItem *item = new DKIMManageRulesWidgetItem(mTreeWidget);
item->setRule(rule);
}
}
......
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