From e0d21d2158e8d03ee3139392284915c19ee4619b Mon Sep 17 00:00:00 2001 From: reduz Date: Mon, 28 Dec 2015 15:59:20 -0300 Subject: Ability to set autoloads as singleton global variables --- scene/main/node.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scene/main/node.cpp') diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 027e9ace6..2b2a188e7 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -856,7 +856,10 @@ Node *Node::_get_child_by_name(const StringName& p_name) const { Node *Node::_get_node(const NodePath& p_path) const { - ERR_FAIL_COND_V( !data.inside_tree && p_path.is_absolute(), NULL ); + if (!data.inside_tree && p_path.is_absolute()) { + ERR_EXPLAIN("Can't use get_node() with absolute paths from outside the active scene tree."); + ERR_FAIL_V(NULL); + } Node *current=NULL; Node *root=NULL; -- cgit v1.2.3-70-g09d2