瀏覽代碼

Fix editor crash when converting sprite to 2D mesh

Chaosus 6 年之前
父節點
當前提交
8b5e070ec7
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      editor/plugins/sprite_editor_plugin.cpp

+ 2 - 0
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();
 	}