Merge pull request #22968 from jfmichaud31/CSGMesh_bug

fix bug #20255 on CSGMesh
This commit is contained in:
Rémi Verschelde 2018-10-24 18:08:13 +02:00 committed by GitHub
commit 7aea8502f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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