diff options
author | Chaosus <chaosus89@gmail.com> | 2019-03-04 17:20:16 +0300 |
---|---|---|
committer | Chaosus <chaosus89@gmail.com> | 2019-03-04 17:37:38 +0300 |
commit | 8b5e070ec73a5b5a20cec43bf8952eeaf89c969d (patch) | |
tree | 9f3b75ec9756209bcfb2130dc41a1b7257acf03b /editor/plugins | |
parent | 9dd9737cb43dc871661945adcc1784756f28a118 (diff) |
Fix editor crash when converting sprite to 2D mesh
Diffstat (limited to 'editor/plugins')
-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(); } |