aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_exit.c')
-rw-r--r--src/ft_exit.c8
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;
}