From 00c38299bfbde52554e3766714787e45bcb3afa2 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Fri, 14 Jun 2024 13:08:38 +0200 Subject: [PATCH] - [FIX] Al esborrar un actor no alliberava la surface. - [FIX] Al esborrar un actor, si estava seleccionat, es quedava un dangling pointer --- source/actor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/actor.cpp b/source/actor.cpp index 755b5f4..d8c51a9 100644 --- a/source/actor.cpp +++ b/source/actor.cpp @@ -955,6 +955,8 @@ namespace actor if (act==first) first = act->next; if (act==dirty) dirty = act->next; if (act->next) act->next->prev = act->prev; + draw::freeSurface(act->surface); + if (act==selected) selected = nullptr; free(act); }