Merge pull request #25215 from akien-mga/scripteditor-goto-line

Fix going to script line on VisualScript errors
This commit is contained in:
Rémi Verschelde 2019-01-22 12:19:15 +01:00 committed by GitHub
commit 4a184a79e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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());