mirror of
https://github.com/godotengine/godot.git
synced 2025-02-18 16:50:48 +00:00
Fix incorrectly clearing edit menu
Delete only if `editor_enabled` is true, otherwise destructor may delete it repeatedly.
This commit is contained in:
parent
abe8b88702
commit
8972dd8492
@ -1420,8 +1420,10 @@ Control *ScriptTextEditor::get_edit_menu() {
|
||||
}
|
||||
|
||||
void ScriptTextEditor::clear_edit_menu() {
|
||||
if (editor_enabled) {
|
||||
memdelete(edit_hb);
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptTextEditor::set_find_replace_bar(FindReplaceBar *p_bar) {
|
||||
code_editor->set_find_replace_bar(p_bar);
|
||||
|
Loading…
Reference in New Issue
Block a user