1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Fix CSGShape debug_collision_shape crash

Fixes CSGShape debug_collision_shape crash.

(cherry picked from commit 0cba21f2da)
This commit is contained in:
smix8
2023-11-02 02:19:13 +01:00
committed by Rémi Verschelde
parent c93eb1ba91
commit 611c435dab

View File

@@ -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());