summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-07-19 13:49:43 +0200
committerGitHub <noreply@github.com>2022-07-19 13:49:43 +0200
commit8351d75b7f8322fda894c151db7c91106425c098 (patch)
tree4be9103ef77ac989d2ed1c7ceb398baa0d441844
parent6ec21d89692e33495711a81b00df5d70319274fc (diff)
parent8972dd8492a743e44e3e9d9143397d1f08c440ff (diff)
Merge pull request #63195 from Rindbee/fix-wrong-clear-edit-menu
-rw-r--r--editor/plugins/script_text_editor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 3ba8343268..fc545b44e8 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1420,7 +1420,9 @@ Control *ScriptTextEditor::get_edit_menu() {
}
void ScriptTextEditor::clear_edit_menu() {
- memdelete(edit_hb);
+ if (editor_enabled) {
+ memdelete(edit_hb);
+ }
}
void ScriptTextEditor::set_find_replace_bar(FindReplaceBar *p_bar) {