aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_warp_level.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_warp_level.c')
-rw-r--r--src/ft_warp_level.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c
index 6f1d387..f4a978d 100644
--- a/src/ft_warp_level.c
+++ b/src/ft_warp_level.c
@@ -52,11 +52,15 @@ static void
cl->c_rgb = ft_init_rgb();
cl->rlist = ft_init_s_ray();
i = -1;
- while (++i < 8)
+ while (++i <= 5)
{
mlx_destroy_image(cl->wlist.wlx, cl->tlist[i].img);
cl->tlist[i].img = NULL;
}
+ if (cl->mlist.isftex && cl->tlist[6].img)
+ mlx_destroy_image(cl->wlist.wlx, cl->tlist[6].img);
+ if (cl->mlist.isctex && cl->tlist[7].img)
+ mlx_destroy_image(cl->wlist.wlx, cl->tlist[7].img);
if (cl->mlist.istraps && cl->tlist[15].img)
mlx_destroy_image(cl->wlist.wlx, cl->tlist[15].img);
ft_del_extra_sprites(cl);