diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-06 16:27:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-06 16:27:10 +0200 |
commit | 5a4d1bff79da7e443baebaca21b294583d2121c5 (patch) | |
tree | c24b4e19c138d0335e7dbabb91afd966d4a1e698 | |
parent | f0eb3ac5d34459ffa84c1f6ad6e6b8529967bdf9 (diff) | |
parent | e0742be4db844fd06ec6c0e99924a0f826e989d5 (diff) |
Merge pull request #62777 from object71/potential-fix-for-crash-error-expand
-rw-r--r-- | editor/debugger/script_editor_debugger.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 408d6af022..f8b82ecc51 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -1422,6 +1422,10 @@ bool ScriptEditorDebugger::is_skip_breakpoints() { void ScriptEditorDebugger::_error_activated() { TreeItem *selected = error_tree->get_selected(); + if (!selected) { + return; + } + TreeItem *ci = selected->get_first_child(); if (ci) { selected->set_collapsed(!selected->is_collapsed()); @@ -1430,6 +1434,11 @@ void ScriptEditorDebugger::_error_activated() { void ScriptEditorDebugger::_error_selected() { TreeItem *selected = error_tree->get_selected(); + + if (!selected) { + return; + } + Array meta = selected->get_metadata(0); if (meta.size() == 0) { return; |