Skip to content

Commit

Permalink
Merge pull request godotengine#65830 from EricEzaM/fix-shortcut-crash
Browse files Browse the repository at this point in the history
Check TreeItem for nullptr before accessing.
  • Loading branch information
akien-mga committed Sep 15, 2022
2 parents 78a9a3d + badea35 commit 76b41bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions editor/editor_settings_dialog.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 76b41bd

Please sign in to comment.