aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_exit.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 14:00:59 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 14:00:59 +0100
commit1bd6b6e64b02ce70e193bb108843bc0ee5c051c3 (patch)
tree394788b4dc6f1248f44894798fc708e87f1bd8a1 /src/ft_exit.c
parentLoaded weapon images needs to memory (diff)
download42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.tar.gz
42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.tar.bz2
42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.tar.xz
42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.tar.zst
42-cub3d-1bd6b6e64b02ce70e193bb108843bc0ee5c051c3.zip
Correct init and frees
Diffstat (limited to 'src/ft_exit.c')
-rw-r--r--src/ft_exit.c4
1 files changed, 4 insertions, 0 deletions
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);
}