Merge pull request #26590 from Chaosus/fix_sprite_region_crash

Fix editor crash when converting sprite to 2D mesh
This commit is contained in:
Rémi Verschelde 2019-03-04 16:58:39 +01:00 committed by GitHub
commit 878950db16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -91,6 +91,8 @@ Vector<Vector2> expand(const Vector<Vector2> &points, const Rect2i &rect, float
Vector<Vector2> outPoints;
ClipperLib::PolyNode *p2 = out.GetFirst();
ERR_FAIL_COND_V(!p2, points);
while (p2->IsHole()) {
p2 = p2->GetNext();
}