diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-01-04 10:40:17 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-01-04 10:40:17 +0100 |
commit | 2d07789ad1a2a746c00f2b2f05787a2c5ddfed67 (patch) | |
tree | a571ad80ceea95d61a9c0d240d76ac3ccea0eec0 | |
parent | 6994602e4f6c3e5fbd03b0ba17eadb9d34cfcac4 (diff) |
Fix compilation error after 4c30963
-rw-r--r-- | editor/editor_node.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index ed7779bf7d..1fb9f875ba 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2272,7 +2272,8 @@ void EditorNode::_edit_current(bool p_skip_foreign) { if (main_plugin) { // special case if use of external editor is true - if (main_plugin->get_name() == "Script" && current_obj->get_class_name() != StringName("VisualScript") && res && !res->is_built_in() && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) { + Resource *current_res = Object::cast_to<Resource>(current_obj); + if (main_plugin->get_name() == "Script" && current_obj->get_class_name() != StringName("VisualScript") && current_res && !current_res->is_built_in() && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) { if (!changing_scene) { main_plugin->edit(current_obj); } |