summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafał Mikrut <mikrutrafal@protonmail.com>2021-01-03 21:29:18 +0100
committerRafał Mikrut <mikrutrafal@protonmail.com>2021-01-03 21:29:18 +0100
commitb0f28d225928c5323cf255711f998b52cf8190d5 (patch)
treeb8d7d4550729c45187cf21e99575f69512b43ab8
parent950dedbb6858458b5944523bf806e35eb4d6a5d8 (diff)
Remove memory leak in Canvas Group
-rw-r--r--scene/2d/canvas_group.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/2d/canvas_group.cpp b/scene/2d/canvas_group.cpp
index 0e0aecf224..0f0e583ea7 100644
--- a/scene/2d/canvas_group.cpp
+++ b/scene/2d/canvas_group.cpp
@@ -84,4 +84,5 @@ CanvasGroup::CanvasGroup() {
set_fit_margin(10.0); //sets things
}
CanvasGroup::~CanvasGroup() {
+ RS::get_singleton()->canvas_item_set_canvas_group_mode(get_canvas_item(), RS::CANVAS_GROUP_MODE_DISABLED);
}