mirror of
https://github.com/godotengine/godot
synced 2024-09-19 21:01:28 +00:00
Ensure that mesh instance is properly freed when freeing Polygon2D
This commit is contained in:
parent
7580565c28
commit
5c95288a6e
|
@ -663,5 +663,7 @@ Polygon2D::Polygon2D() {
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
RS::get_singleton()->free(mesh);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue