Skip to content
Snippets Groups Projects
Commit cf6cdd20 authored by Lioncash's avatar Lioncash
Browse files

configure_hotkeys: Make comparison check a little more self-documenting

This is checking if an index is valid or not and returning early if it
isn't.
parent c4ba7174
No related branches found
No related tags found
No related merge requests found
......@@ -66,8 +66,9 @@ void ConfigureHotkeys::Populate(const HotkeyRegistry& registry) {
}
void ConfigureHotkeys::Configure(QModelIndex index) {
if (index.parent() == QModelIndex())
if (!index.parent().isValid()) {
return;
}
index = index.sibling(index.row(), 1);
auto* model = ui->hotkey_list->model();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment