From badea350acf4b9af82c77b706abb396b0fff7661 Mon Sep 17 00:00:00 2001 From: Eric M Date: Thu, 15 Sep 2022 23:50:52 +1000 Subject: Check TreeItem for nullptr before accessing. --- editor/editor_settings_dialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'editor') 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) { -- cgit v1.2.3