diff options
Diffstat (limited to 'src/ft_warp_level.c')
-rw-r--r-- | src/ft_warp_level.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c index 69b7b78..56d4d67 100644 --- a/src/ft_warp_level.c +++ b/src/ft_warp_level.c @@ -51,11 +51,12 @@ static void cl->f_rgb = ft_init_rgb(); cl->c_rgb = ft_init_rgb(); cl->rlist = ft_init_s_ray(); - i = -1; - while (++i < 5) + i = 0; + while (i < 5) { mlx_destroy_image(cl->wlist.wlx, cl->tlist[i].img); - cl->tlist[i].img = NULL; + cl->tlist[i].ptr = NULL; + i++; } if (cl->mlist.isnlvl && cl->tlist[5].img) mlx_destroy_image(cl->wlist.wlx, cl->tlist[5].img); |