Skip to content

Commit 2f515d6

Browse files
committed
Add forgotten get_space() check in GodotArea3D::remove_soft_body_from_query()
My fault, I added a `get_space()` check for the other `GodotArea3D::remove_*_from_query()` but forgot about `soft_body`.
1 parent 922ae7e commit 2f515d6

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)