Skip to content

Commit 3abff94

Browse files
committed
Merge pull request #97130 from Rindbee/check-space-in-remove_soft_body_from_query
Add forgotten `get_space()` check in `GodotArea3D::remove_soft_body_from_query()`
2 parents 21134e1 + 2f515d6 commit 3abff94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

servers/physics_3d/godot_area_3d.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void GodotArea3D::add_soft_body_to_query(GodotSoftBody3D *p_soft_body, uint32_t
188188
void GodotArea3D::remove_soft_body_from_query(GodotSoftBody3D *p_soft_body, uint32_t p_soft_body_shape, uint32_t p_area_shape) {
189189
BodyKey bk(p_soft_body, p_soft_body_shape, p_area_shape);
190190
monitored_soft_bodies[bk].dec();
191-
if (!monitor_query_list.in_list()) {
191+
if (get_space() && !monitor_query_list.in_list()) {
192192
_queue_monitor_update();
193193
}
194194
}

0 commit comments

Comments
 (0)