diff options
| author | Rémi Verschelde | 2017-09-17 17:57:00 +0200 |
|---|---|---|
| committer | GitHub | 2017-09-17 17:57:00 +0200 |
| commit | 4208518c4de88186a8baac5d87e4c20c218fccc8 (patch) | |
| tree | 3a1ddfad8ff6c84200a3fec0f36c006771b88795 /editor/plugins/script_editor_plugin.cpp | |
| parent | 3531251902595f4d2d17cab7100b4ff7a1eee2c7 (diff) | |
| parent | a48dc9aa17308beb7395372751500925837841a5 (diff) | |
| download | godot-4208518c4de88186a8baac5d87e4c20c218fccc8.tar.gz godot-4208518c4de88186a8baac5d87e4c20c218fccc8.tar.zst godot-4208518c4de88186a8baac5d87e4c20c218fccc8.zip | |
Merge pull request #11356 from Paulb23/text_editor_theme_crash
Fixed segfault on loading text editor theme
[ci skip]
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 44a9bc6d2..9af5885a1 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1682,9 +1682,10 @@ bool ScriptEditor::edit(const Ref<Script> &p_script, int p_line, int p_col, bool break; } ERR_FAIL_COND_V(!se, false); - tab_container->add_child(se); + // load script before adding as child else editor will crash at theme loading se->set_edited_script(p_script); + tab_container->add_child(se); se->set_tooltip_request_func("_get_debug_tooltip", this); if (se->get_edit_menu()) { se->get_edit_menu()->hide(); |
