diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index 4da94c3baaa..a8d0a1fb941 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -226,6 +226,9 @@ AABB CSGShape::get_aabb() const { PoolVector CSGShape::get_brush_faces() { ERR_FAIL_COND_V(!is_inside_tree(), PoolVector()); CSGBrush *b = _get_brush(); + if (!b) { + return PoolVector(); + } PoolVector faces; int fc = b->faces.size();