diff options
Diffstat (limited to 'src/ft_exit.c')
-rw-r--r-- | src/ft_exit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c index f753f84..b9e68d0 100644 --- a/src/ft_exit.c +++ b/src/ft_exit.c @@ -80,6 +80,8 @@ static void static void ft_del_tex(t_cub *clist) { + int8_t i; + if (clist->tlist[0].img) mlx_destroy_image(clist->wlist.wlx, clist->tlist[0].img); if (clist->tlist[1].img) @@ -102,6 +104,10 @@ static void mlx_destroy_image(clist->wlist.wlx, clist->tlist[16].img); if (clist->mlist.isheals && clist->tlist[17].img) mlx_destroy_image(clist->wlist.wlx, clist->tlist[17].img); + i = -1; + while (++i < 11) + if (clist->tnum[i].img) + mlx_destroy_image(clist->wlist.wlx, clist->tnum[i].img); ft_del_extra_sprites(clist); } |