summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-01-22 12:19:15 +0100
committerGitHub <noreply@github.com>2019-01-22 12:19:15 +0100
commit4a184a79e091fd737cb279d61b17606b268c347e (patch)
treed2d4e597b3b143e0a4d49cebaeb70e90a1f05b1b
parent7c8f55f8573bb0b86425cf6e623fe3da5891f0ff (diff)
parent79a4c41b22ba4105a601bb4ea56c06cf4a4b2a29 (diff)
Merge pull request #25215 from akien-mga/scripteditor-goto-line
Fix going to script line on VisualScript errors
-rw-r--r--editor/plugins/script_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 182738cf14..9e65d9de10 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -301,7 +301,7 @@ void ScriptEditor::_goto_script_line2(int p_line) {
void ScriptEditor::_goto_script_line(REF p_script, int p_line) {
Ref<Script> script = Object::cast_to<Script>(*p_script);
- if (!script.is_null() && script->has_source_code()) {
+ if (script.is_valid() && (script->has_source_code() || script->get_path().is_resource_file())) {
if (edit(p_script, p_line, 0)) {
editor->push_item(p_script.ptr());