소스 검색

Merge pull request #69146 from clayjohn/Polygon2D-error

Ensure that mesh instance is properly freed when freeing Polygon2D
Rémi Verschelde 2 년 전
부모
커밋
34df77285c
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      scene/2d/polygon_2d.cpp

+ 2 - 0
scene/2d/polygon_2d.cpp

@@ -663,5 +663,7 @@ Polygon2D::Polygon2D() {
 }
 
 Polygon2D::~Polygon2D() {
+	// This will free the internally-allocated mesh instance, if allocated.
+	RS::get_singleton()->canvas_item_attach_skeleton(get_canvas_item(), RID());
 	RS::get_singleton()->free(mesh);
 }