소스 검색

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