aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/editor_data.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2015-08-29 13:02:56 -0300
committerJuan Linietsky2015-08-29 13:02:56 -0300
commit1fecba6b5bca276054a26562402cc329ce3dff5b (patch)
treec496fc33cbd5489feeabfd7b8ce8bd976893fa43 /tools/editor/editor_data.cpp
parent3a59747c6292265a2a7ac60720e7d8401b02d77d (diff)
downloadgodot-1fecba6b5bca276054a26562402cc329ce3dff5b.tar.gz
godot-1fecba6b5bca276054a26562402cc329ce3dff5b.tar.zst
godot-1fecba6b5bca276054a26562402cc329ce3dff5b.zip
-added hints to sprite v/hframes, fixes truncation problem
-removed an error being printed often unnecesarly about missing child
Diffstat (limited to 'tools/editor/editor_data.cpp')
-rw-r--r--tools/editor/editor_data.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp
index ac68fcb07..3131bd895 100644
--- a/tools/editor/editor_data.cpp
+++ b/tools/editor/editor_data.cpp
@@ -523,7 +523,7 @@ Ref<Script> EditorData::get_scene_root_script(int p_idx) const {
if (!edited_scene[p_idx].root)
return Ref<Script>();
Ref<Script> s=edited_scene[p_idx].root->get_script();
- if (!s.is_valid()) {
+ if (!s.is_valid() && edited_scene[p_idx].root->get_child_count()) {
Node *n = edited_scene[p_idx].root->get_child(0);
while(!s.is_valid() && n && n->get_filename()==String()) {
s=n->get_script();