diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-27 02:05:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-27 02:05:54 +0200 |
commit | 67b152ab491c0355bf2559bcc8d2af7aa0303b06 (patch) | |
tree | 30466dffa48e44147b8d592dda7279c35105346d /scene/main | |
parent | 53c0010932f9c1becb63c16243f3a00ede359989 (diff) | |
parent | 3e25cf9e05103e3ef3279c93c9e9170cbcc7eaaf (diff) |
Merge pull request #10671 from hpvb/fix-10654
Add two missing Null checks
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/scene_tree.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 03a604734e..33331a465f 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1401,8 +1401,11 @@ void SceneTree::_live_edit_create_node_func(const NodePath &p_parent, const Stri Node *n2 = n->get_node(p_parent); Node *no = Object::cast_to<Node>(ClassDB::instance(p_type)); - no->set_name(p_name); + if (!no) { + continue; + } + no->set_name(p_name); n2->add_child(no); } } |