Fix accessing scene tree without checking: MeshInstance3D::create_debug_tangents, GIProbe::bake
(cherry picked from commit ef589a7cd3
)
This commit is contained in:
parent
c3c3497c17
commit
7eccdbe693
2 changed files with 2 additions and 2 deletions
|
@ -391,7 +391,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) {
|
|||
mmi->set_multimesh(baker.create_debug_multimesh());
|
||||
add_child(mmi);
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (get_tree()->get_edited_scene_root() == this) {
|
||||
if (is_inside_tree() && get_tree()->get_edited_scene_root() == this) {
|
||||
mmi->set_owner(this);
|
||||
} else {
|
||||
mmi->set_owner(get_owner());
|
||||
|
|
|
@ -812,7 +812,7 @@ void MeshInstance::create_debug_tangents() {
|
|||
add_child(mi);
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
if (this == get_tree()->get_edited_scene_root()) {
|
||||
if (is_inside_tree() && this == get_tree()->get_edited_scene_root()) {
|
||||
mi->set_owner(this);
|
||||
} else {
|
||||
mi->set_owner(get_owner());
|
||||
|
|
Loading…
Reference in a new issue