Commit d54af16e authored by Klaus Klein's avatar Klaus Klein Committed by Tomaz Canabrava
Browse files

Fix segmentation fault on QuickCommands::indexSelect

parent 91b7c1a0
......@@ -115,11 +115,16 @@ void QuickCommandsWidget::indexSelected(const QModelIndex &idx)
}
const auto item = priv->model->itemFromIndex(sourceIdx);
const auto data = item->data(QuickCommandsModel::QuickCommandRole).value<QuickCommandData>();
ui->name->setText(data.name);
ui->tooltip->setText(data.tooltip);
ui->command->setPlainText(data.command);
ui->group->setCurrentText(item->parent()->text());
if (item != nullptr && item->parent() != nullptr) {
const auto data = item->data(QuickCommandsModel::QuickCommandRole).value<QuickCommandData>();
ui->name->setText(data.name);
ui->tooltip->setText(data.tooltip);
ui->command->setPlainText(data.command);
ui->group->setCurrentText(item->parent()->text());
runShellCheck();
}
runShellCheck();
}
......
Supports Markdown
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