Skip to content

Commit

Permalink
Check TreeItem for nullptr before accessing.
Browse files Browse the repository at this point in the history
  • Loading branch information
EricEzaM committed Sep 15, 2022
1 parent 4ba934b commit badea35
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 badea35

Please sign in to comment.