Fix wrong Ref checks in ScriptTextEditor
This commit is contained in:
parent
40448082ab
commit
51582b3fd6
1 changed files with 2 additions and 2 deletions
|
|
@ -201,7 +201,7 @@ Vector<String> ScriptTextEditor::get_functions() {
|
|||
List<String> fnc;
|
||||
|
||||
Ref<Script> script = edited_res;
|
||||
if (script->is_valid() && script->get_language()->validate(text, script->get_path(), &fnc)) {
|
||||
if (script.is_valid() && script->get_language()->validate(text, script->get_path(), &fnc)) {
|
||||
//if valid rewrite functions to latest
|
||||
functions.clear();
|
||||
for (const String &E : fnc) {
|
||||
|
|
@ -214,7 +214,7 @@ Vector<String> ScriptTextEditor::get_functions() {
|
|||
|
||||
void ScriptTextEditor::apply_code() {
|
||||
Ref<Script> script = edited_res;
|
||||
if (script->is_valid()) {
|
||||
if (script.is_valid()) {
|
||||
script->set_source_code(code_editor->get_text_editor()->get_text());
|
||||
script->update_exports();
|
||||
if (!pending_dragged_exports.is_empty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue