From abd20a73b4733a1a8b845f6ff0817ed77e545173 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 10 Mar 2020 10:48:58 +0100 Subject: Freed multiple leaks --- src/ft_exit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ft_exit.c') diff --git a/src/ft_exit.c b/src/ft_exit.c index 97c9e02..fb6de09 100644 --- a/src/ft_exit.c +++ b/src/ft_exit.c @@ -57,6 +57,10 @@ 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); } int -- cgit v1.2.3 From 79af897f235b2172ce37e6d30b829fa0928aef3a Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 11 Mar 2020 09:17:49 +0100 Subject: Good trap init --- src/ft_exit.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ft_exit.c') diff --git a/src/ft_exit.c b/src/ft_exit.c index fb6de09..3b00701 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); -- cgit v1.2.3 From bfa1f4e6e61152ba3ff555d1508f43f0a5ab2754 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 11 Mar 2020 09:50:36 +0100 Subject: Secured collision segv --- src/ft_exit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ft_exit.c') diff --git a/src/ft_exit.c b/src/ft_exit.c index 3b00701..4125567 100644 --- a/src/ft_exit.c +++ b/src/ft_exit.c @@ -62,6 +62,8 @@ static void 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.istrap && clist->tlist[15].img) + mlx_destroy_image(clist->wlist.wlx, clist->tlist[15].img); } int -- cgit v1.2.3 From c581c7e3543058f015bddf96d76ac2d771ea40a0 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 11 Mar 2020 10:16:48 +0100 Subject: Nice parse --- src/ft_exit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ft_exit.c') diff --git a/src/ft_exit.c b/src/ft_exit.c index 4125567..4a131c8 100644 --- a/src/ft_exit.c +++ b/src/ft_exit.c @@ -62,7 +62,7 @@ static void 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.istrap && clist->tlist[15].img) + if (clist->mlist.istraps && clist->tlist[15].img) mlx_destroy_image(clist->wlist.wlx, clist->tlist[15].img); } -- cgit v1.2.3 From 114df1314a69161e5802ce6192aa8f1599867f3e Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Wed, 11 Mar 2020 15:30:51 +0100 Subject: qweqwe --- src/ft_exit.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ft_exit.c') diff --git a/src/ft_exit.c b/src/ft_exit.c index 4a131c8..e0093da 100644 --- a/src/ft_exit.c +++ b/src/ft_exit.c @@ -73,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; } -- cgit v1.2.3