Added a fail condition to prevent a crash
This commit is contained in:
parent
451e5fd051
commit
720f543caa
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue