diff options
author | Eric M <itsjusteza@gmail.com> | 2022-09-15 23:50:52 +1000 |
---|---|---|
committer | Eric M <itsjusteza@gmail.com> | 2022-09-15 23:50:52 +1000 |
commit | badea350acf4b9af82c77b706abb396b0fff7661 (patch) | |
tree | 3152a2e14cc5a1c5f94a270cbf3b22ce8883148f | |
parent | 4ba934bf3d1e697d8f332b5e8cfd694cdf49a7ba (diff) |
Check TreeItem for nullptr before accessing.
-rw-r--r-- | editor/editor_settings_dialog.cpp | 4 |
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) { |