summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2019-01-29 08:15:34 -0800
committerK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2019-01-30 20:19:44 -0800
commitb83c3827f3f127a7f5a56f072479110b6ff721a9 (patch)
treed4546edf48caabff9c0ca380af1d15f7f12ac6cb /scene/resources
parent35bb52011a4cbcd8ca3779ab1761244f06a33127 (diff)
Add check in folding to see if the nodepath exists to avoid message spam.
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/packed_scene.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index ea810edf8c..f28a67b493 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -55,7 +55,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
Node *p_name; \
if (p_id & FLAG_ID_IS_PATH) { \
NodePath np = node_paths[p_id & FLAG_MASK]; \
- p_name = ret_nodes[0]->_get_node(np); \
+ p_name = ret_nodes[0]->get_node_or_null(np); \
} else { \
ERR_FAIL_INDEX_V(p_id &FLAG_MASK, nc, NULL); \
p_name = ret_nodes[p_id & FLAG_MASK]; \
@@ -342,7 +342,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
}
for (int i = 0; i < editable_instances.size(); i++) {
- Node *ei = ret_nodes[0]->_get_node(editable_instances[i]);
+ Node *ei = ret_nodes[0]->get_node_or_null(editable_instances[i]);
if (ei) {
ret_nodes[0]->set_editable_instance(ei, true);
}