summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-15 20:12:18 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-15 20:12:18 +0200
commit76b41bde3c231d80ebe080678cdcec3c861c771f (patch)
tree6fbfec0703791ef5130b8f071b5032d8c9362323 /editor
parent78a9a3de69b3955e81e30335a90307f19059d528 (diff)
parentbadea350acf4b9af82c77b706abb396b0fff7661 (diff)
Merge pull request #65830 from EricEzaM/fix-shortcut-crash
Check TreeItem for nullptr before accessing.
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_settings_dialog.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp
index ec67cde112..8062b6f756 100644
--- a/editor/editor_settings_dialog.cpp
+++ b/editor/editor_settings_dialog.cpp
@@ -552,6 +552,10 @@ void EditorSettingsDialog::_shortcut_cell_double_clicked() {
const ShortcutButton edit_btn_id = EditorSettingsDialog::SHORTCUT_EDIT;
const int edit_btn_col = 1;
TreeItem *ti = shortcuts->get_selected();
+ if (ti == nullptr) {
+ return;
+ }
+
String type = ti->get_meta("type");
int col = shortcuts->get_selected_column();
if (type == "shortcut" && col == 0) {