Merge pull request #69146 from clayjohn/Polygon2D-error

Ensure that mesh instance is properly freed when freeing Polygon2D
This commit is contained in:
Rémi Verschelde 2022-11-25 10:11:47 +01:00
commit 34df77285c
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

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