diff options
Diffstat (limited to 'servers/physics_2d/shape_2d_sw.cpp')
-rw-r--r-- | servers/physics_2d/shape_2d_sw.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp index 433942708e..2b0eab5999 100644 --- a/servers/physics_2d/shape_2d_sw.cpp +++ b/servers/physics_2d/shape_2d_sw.cpp @@ -1011,6 +1011,10 @@ void ConcavePolygonShape2DSW::cull(const Rect2 &p_local_aabb, Callback p_callbac stack[i]=0; */ + if (segments.size() == 0 || points.size() == 0 || bvh.size() == 0) { + return; + } + int level = 0; const Segment *segmentptr = &segments[0]; |