diff options
author | Yuri Sizov <yuris@humnom.net> | 2023-12-20 13:19:46 +0100 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-12-20 13:19:46 +0100 |
commit | 34ecfff6722be4819707b128ccae561eacf101fc (patch) | |
tree | 75aa66e379d17b2c70286deafe124295e3a342e6 /servers/rendering/renderer_canvas_cull.h | |
parent | 3ce73e5d419011d1642ed30a3417362b82c41898 (diff) | |
download | redot-engine-34ecfff6722be4819707b128ccae561eacf101fc.tar.gz |
Avoid crashes when engine leaks canvas items and friends
Diffstat (limited to 'servers/rendering/renderer_canvas_cull.h')
-rw-r--r-- | servers/rendering/renderer_canvas_cull.h | 6 |
1 files changed, 6 insertions, 0 deletions
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<Item, true> canvas_item_owner; RID_Owner<RendererCanvasRender::Light, true> canvas_light_owner; + template <class T> + 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(); }; |