diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-03-04 16:58:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-04 16:58:39 +0100 |
commit | 878950db162cde51be1aa1df952bf0347e8cdbd5 (patch) | |
tree | 92226eea79cf436f6068ac2e5029ecbaff67e2ff | |
parent | b753223ac2c03b4d6d4ee62f51b651902fcca870 (diff) | |
parent | 8b5e070ec73a5b5a20cec43bf8952eeaf89c969d (diff) |
Merge pull request #26590 from Chaosus/fix_sprite_region_crash
Fix editor crash when converting sprite to 2D mesh
-rw-r--r-- | editor/plugins/sprite_editor_plugin.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp index c1718dd8bf..3854d27567 100644 --- a/editor/plugins/sprite_editor_plugin.cpp +++ b/editor/plugins/sprite_editor_plugin.cpp @@ -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(); } |