diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-15 20:12:18 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-15 20:12:18 +0200 |
commit | 76b41bde3c231d80ebe080678cdcec3c861c771f (patch) | |
tree | 6fbfec0703791ef5130b8f071b5032d8c9362323 /editor | |
parent | 78a9a3de69b3955e81e30335a90307f19059d528 (diff) | |
parent | badea350acf4b9af82c77b706abb396b0fff7661 (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.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) { |