From 90ae8d4791b92a20671b92f57a0ff1b410bed1e1 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 12 Mar 2024 06:15:35 +0100 Subject: [PATCH] Tweaks to CommandRectAnimation's destructor. --- servers/rendering/rasterizer.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/servers/rendering/rasterizer.h b/servers/rendering/rasterizer.h index 38c8e69738..d753dc7708 100644 --- a/servers/rendering/rasterizer.h +++ b/servers/rendering/rasterizer.h @@ -897,10 +897,13 @@ class RasterizerCanvas { type = TYPE_RECT_ANIMATION; } - ~CommandRectAnimation() { + virtual ~CommandRectAnimation() { for (int i = 0; i < rects.size(); ++i) { memdelete(rects[i]); } + + rects.clear(); + times.clear(); } };