diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2020-03-11 18:59:58 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2020-03-11 18:59:58 +0100 |
commit | b6388b5101d8187f746f91c89842e932a1d01cb6 (patch) | |
tree | 70bd9ba7012f5906db01b485ec8f58f5a4697240 /src/ft_exit.c | |
parent | close but no cigar (diff) | |
parent | ca tue (diff) | |
download | 42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.gz 42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.bz2 42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.xz 42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.tar.zst 42-cub3d-b6388b5101d8187f746f91c89842e932a1d01cb6.zip |
get merged
Diffstat (limited to 'src/ft_exit.c')
-rw-r--r-- | src/ft_exit.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c index 97c9e02..e0093da 100644 --- a/src/ft_exit.c +++ b/src/ft_exit.c @@ -33,6 +33,7 @@ static void ft_memdel((void**)&clist->mlist.ce_tex_path); ft_memdel((void**)&clist->mlist.nlevel_path); ft_memdel((void**)&clist->mlist.skybox_path); + ft_memdel((void**)&clist->mlist.traps_path); ft_memdel((void**)&clist->mlist.music_path); ft_memdel((void**)&clist->mlist.music_cmd); ft_memdel((void**)&clist->mlist.mapl); @@ -57,6 +58,12 @@ static void mlx_destroy_image(clist->wlist.wlx, clist->tlist[4].img); if (clist->mlist.isnlvl && clist->tlist[5].img) mlx_destroy_image(clist->wlist.wlx, clist->tlist[5].img); + if (clist->mlist.isftex && clist->tlist[6].img) + mlx_destroy_image(clist->wlist.wlx, clist->tlist[6].img); + if (clist->mlist.isctex && clist->tlist[7].img) + mlx_destroy_image(clist->wlist.wlx, clist->tlist[7].img); + if (clist->mlist.istraps && clist->tlist[15].img) + mlx_destroy_image(clist->wlist.wlx, clist->tlist[15].img); } int @@ -66,6 +73,7 @@ int ft_del_tex(clist); if (clist->wlist.inited) { + mlx_destroy_image(clist->wlist.wlx, clist->img.img); mlx_destroy_window(clist->wlist.wlx, clist->wlist.winptr); clist->wlist.winptr = NULL; } |