diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-25 10:11:47 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-25 10:11:47 +0100 |
commit | 34df77285c68dd11c43571c90d41d803f2f97f5a (patch) | |
tree | 7cdb8a1fbab97c386a6ad5d4fcbceecb6a6d8a53 | |
parent | 136ecbd52cee6e37b5f4174304b98c5d65e670f5 (diff) | |
parent | 5c95288a6e6cacdd62f1698b00157de4d56fdfc9 (diff) |
Merge pull request #69146 from clayjohn/Polygon2D-error
Ensure that mesh instance is properly freed when freeing Polygon2D
-rw-r--r-- | scene/2d/polygon_2d.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index 2c825e8f7b..e41664b006 100644 --- a/scene/2d/polygon_2d.cpp +++ b/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); } |