From 1bd6b6e64b02ce70e193bb108843bc0ee5c051c3 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 19 Mar 2020 14:00:59 +0100 Subject: Correct init and frees --- 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 390f234..f0a25e0 100644 --- a/src/ft_exit.c +++ b/src/ft_exit.c @@ -88,6 +88,10 @@ static void mlx_destroy_image(clist->wlist.wlx, clist->tlist[16].img); if (clist->mlist.isheals && clist->tlist[17].img) mlx_destroy_image(clist->wlist.wlx, clist->tlist[17].img); + if (clist->mlist.isweapon[0] && clist->tlist[18].img) + mlx_destroy_image(clist->wlist.wlx, clist->tlist[18].img); + if (clist->mlist.isweapon[1] && clist->tlist[19].img) + mlx_destroy_image(clist->wlist.wlx, clist->tlist[19].img); ft_del_extra_sprites(clist); } -- cgit v1.2.3