- [FIX] Al esborrar un actor no alliberava la surface.

- [FIX] Al esborrar un actor, si estava seleccionat, es quedava un dangling pointer
This commit is contained in:
2024-06-14 13:08:38 +02:00
parent a59c8b57ad
commit 00c38299bf

View File

@@ -955,6 +955,8 @@ namespace actor
if (act==first) first = act->next; if (act==first) first = act->next;
if (act==dirty) dirty = act->next; if (act==dirty) dirty = act->next;
if (act->next) act->next->prev = act->prev; if (act->next) act->next->prev = act->prev;
draw::freeSurface(act->surface);
if (act==selected) selected = nullptr;
free(act); free(act);
} }