From 34ecfff6722be4819707b128ccae561eacf101fc Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Wed, 20 Dec 2023 13:19:46 +0100 Subject: Avoid crashes when engine leaks canvas items and friends --- servers/rendering/renderer_canvas_cull.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'servers/rendering/renderer_canvas_cull.h') diff --git a/servers/rendering/renderer_canvas_cull.h b/servers/rendering/renderer_canvas_cull.h index ba013e667f..9dfa82a3af 100644 --- a/servers/rendering/renderer_canvas_cull.h +++ b/servers/rendering/renderer_canvas_cull.h @@ -170,6 +170,9 @@ public: RID_Owner canvas_item_owner; RID_Owner canvas_light_owner; + template + void _free_rids(T &p_owner, const char *p_type); + bool disable_scale; bool sdf_used = false; bool snapping_2d_transforms_to_pixel = false; @@ -329,6 +332,9 @@ public: Rect2 _debug_canvas_item_get_rect(RID p_item); bool free(RID p_rid); + + void finalize(); + RendererCanvasCull(); ~RendererCanvasCull(); }; -- cgit v1.2.3