From cf6cdd20f8a62179891476481c45abff751e0ead Mon Sep 17 00:00:00 2001
From: Lioncash <mathew1800@gmail.com>
Date: Tue, 9 Apr 2019 19:47:18 -0400
Subject: [PATCH] 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.
---
 src/yuzu/configuration/configure_hotkeys.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/yuzu/configuration/configure_hotkeys.cpp b/src/yuzu/configuration/configure_hotkeys.cpp
index 55d23d3292..e1ddf61eb8 100644
--- a/src/yuzu/configuration/configure_hotkeys.cpp
+++ b/src/yuzu/configuration/configure_hotkeys.cpp
@@ -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();