avoid crash with empty concavepolygonshape, fixes #3169
This commit is contained in:
parent
eb7901c8b8
commit
cb9dfd5d28
1 changed files with 4 additions and 0 deletions
|
@ -1354,6 +1354,10 @@ void ConcavePolygonShapeSW::_fill_bvh(_VolumeSW_BVH* p_bvh_tree,BVH* p_bvh_array
|
||||||
void ConcavePolygonShapeSW::_setup(DVector<Vector3> p_faces) {
|
void ConcavePolygonShapeSW::_setup(DVector<Vector3> p_faces) {
|
||||||
|
|
||||||
int src_face_count=p_faces.size();
|
int src_face_count=p_faces.size();
|
||||||
|
if (src_face_count==0) {
|
||||||
|
configure(AABB());
|
||||||
|
return;
|
||||||
|
}
|
||||||
ERR_FAIL_COND(src_face_count%3);
|
ERR_FAIL_COND(src_face_count%3);
|
||||||
src_face_count/=3;
|
src_face_count/=3;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue