summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-10-24 18:08:13 +0200
committerGitHub <noreply@github.com>2018-10-24 18:08:13 +0200
commit7aea8502f6c72affa4bddf1841a96151852058bf (patch)
treec27ebf5cd0b9a96149f27dfccaa799e4fb48e390
parentf62af9c2dfe21f259f5a3c5fcb66c4ecf653d45c (diff)
parent720f543caa9cdefbc92273a419d17bb6441b027e (diff)
Merge pull request #22968 from jfmichaud31/CSGMesh_bug
fix bug #20255 on CSGMesh
-rw-r--r--modules/csg/csg_shape.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index d1ef08dc83..44044d2750 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -521,6 +521,11 @@ CSGBrush *CSGMesh::_build_brush() {
Array arrays = mesh->surface_get_arrays(i);
+ if (arrays.size() == 0) {
+ _make_dirty();
+ ERR_FAIL_COND_V(arrays.size() == 0, NULL);
+ }
+
PoolVector<Vector3> avertices = arrays[Mesh::ARRAY_VERTEX];
if (avertices.size() == 0)
continue;