Skip to content

Commit

Permalink
Merge pull request #84338 from smix8/csg_debug_crash
Browse files Browse the repository at this point in the history
Fix CSGShape debug_collision_shape crash
  • Loading branch information
YuriSizov committed Nov 2, 2023
2 parents 1b42673 + 0cba21f commit bd7f65f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/csg/csg_shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,9 @@ bool CSGShape3D::_is_debug_collision_shape_visible() {
}

void CSGShape3D::_update_debug_collision_shape() {
// NOTE: This is called only for the root shape with collision, when root_collision_shape is valid.
if (!use_collision || !is_root_shape() || !root_collision_shape.is_valid() || !_is_debug_collision_shape_visible()) {
return;
}

ERR_FAIL_NULL(RenderingServer::get_singleton());

Expand Down

0 comments on commit bd7f65f

Please sign in to comment.