[ncplane_erase] call destroy_tam() #2286

This commit is contained in:
nick black 2021-10-20 09:31:44 -04:00
parent 7be722edb3
commit 2b86835faa
2 changed files with 2 additions and 0 deletions

View File

@ -726,6 +726,7 @@ destroy_tam(ncplane* p){
if(p->tam){
cleanup_tam(p->tam, p->leny, p->lenx);
free(p->tam);
p->tam = NULL;
}
}

View File

@ -2170,6 +2170,7 @@ void ncplane_erase(ncplane* n){
loginfo("erasing plane\n");
if(n->sprite){
sprixel_hide(n->sprite);
destroy_tam(n);
}
// we must preserve the background, but a pure nccell_duplicate() would be
// wiped out by the egcpool_dump(). do a duplication (to get the stylemask