From 9d41ee71f6caf0ce9ae1778f5bb6701dfc2f95bb Mon Sep 17 00:00:00 2001 From: Ilaria Cislaghi Date: Fri, 1 Mar 2019 14:17:24 +0100 Subject: Editor does not crash anymore if a non root node in escn is missing a parent --- scene/resources/packed_scene.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scene/resources') diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 0d12d388ef..99440ff202 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -92,6 +92,8 @@ Node *SceneState::instance(GenEditState p_edit_state) const { if (i > 0) { + ERR_EXPLAIN(vformat("Invalid scene: node %s does not specify its parent node.", snames[n.name])) + ERR_FAIL_COND_V(n.parent == -1, NULL) NODE_FROM_ID(nparent, n.parent); #ifdef DEBUG_ENABLED if (!nparent && (n.parent & FLAG_ID_IS_PATH)) { -- cgit v1.2.3