diff --git a/scene/3d/spring_bone_simulator_3d.cpp b/scene/3d/spring_bone_simulator_3d.cpp index 54ae2807f32..1350d54c6e1 100644 --- a/scene/3d/spring_bone_simulator_3d.cpp +++ b/scene/3d/spring_bone_simulator_3d.cpp @@ -1371,6 +1371,9 @@ void SpringBoneSimulator3D::_find_collisions() { } void SpringBoneSimulator3D::_process_collisions() { + if (!is_inside_tree()) { + return; + } for (const ObjectID &oid : collisions) { Object *t_obj = ObjectDB::get_instance(oid); if (!t_obj) { @@ -1494,6 +1497,10 @@ void SpringBoneSimulator3D::_set_active(bool p_active) { } void SpringBoneSimulator3D::_process_modification() { + if (!is_inside_tree()) { + return; + } + Skeleton3D *skeleton = get_skeleton(); if (!skeleton) { return; @@ -1515,6 +1522,9 @@ void SpringBoneSimulator3D::_process_modification() { } void SpringBoneSimulator3D::reset() { + if (!is_inside_tree()) { + return; + } Skeleton3D *skeleton = get_skeleton(); if (!skeleton) { return;