From 8b5e070ec73a5b5a20cec43bf8952eeaf89c969d Mon Sep 17 00:00:00 2001 From: Chaosus Date: Mon, 4 Mar 2019 17:20:16 +0300 Subject: Fix editor crash when converting sprite to 2D mesh --- editor/plugins/sprite_editor_plugin.cpp | 2 ++ 1 file changed, 2 insertions(+) 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 expand(const Vector &points, const Rect2i &rect, float Vector outPoints; ClipperLib::PolyNode *p2 = out.GetFirst(); + ERR_FAIL_COND_V(!p2, points); + while (p2->IsHole()) { p2 = p2->GetNext(); } -- cgit v1.2.3