diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-01 22:21:40 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-01 22:21:40 +0100 |
commit | 3e707c8a71903f1679d5831ee82a5ad19830e7c6 (patch) | |
tree | 8c3e227b85dc96e32c961395032d37040697e17a /src | |
parent | in progress (diff) | |
download | 42-cub3d-3e707c8a71903f1679d5831ee82a5ad19830e7c6.tar.gz 42-cub3d-3e707c8a71903f1679d5831ee82a5ad19830e7c6.tar.bz2 42-cub3d-3e707c8a71903f1679d5831ee82a5ad19830e7c6.tar.xz 42-cub3d-3e707c8a71903f1679d5831ee82a5ad19830e7c6.tar.zst 42-cub3d-3e707c8a71903f1679d5831ee82a5ad19830e7c6.zip |
Better exit
Diffstat (limited to 'src')
-rw-r--r-- | src/ft_exit.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c index 1c4a1a8..837c6aa 100644 --- a/src/ft_exit.c +++ b/src/ft_exit.c @@ -33,7 +33,6 @@ static void ft_memdel((void**)&clist->plist); if (!clist->wlist->inited) ft_memdel((void**)&clist->wlist->winptr); - /* ft_memdel((void**)&clist->wlist->wlx); */ ft_memdel((void**)&clist->wlist); ft_memdel((void**)&clist); } @@ -41,9 +40,6 @@ static void int ft_exit(uint8_t exit_code, t_cub *clist) { - /* uint8_t i; */ - - /* i = 0; */ if (clist->walltexgood) { if (clist->tlist[0].img) @@ -56,22 +52,8 @@ int mlx_destroy_image(clist->wlist->wlx, clist->tlist[3].img); if (clist->tlist[4].img) mlx_destroy_image(clist->wlist->wlx, clist->tlist[4].img); - clist->tlist[0].img = NULL; - clist->tlist[1].img = NULL; - clist->tlist[2].img = NULL; - clist->tlist[3].img = NULL; - clist->tlist[4].img = NULL; - clist->tlist[0].ptr = NULL; - clist->tlist[1].ptr = NULL; - clist->tlist[2].ptr = NULL; - clist->tlist[3].ptr = NULL; - clist->tlist[4].ptr = NULL; if (clist->mlist->isnlvl && clist->tlist[5].img) - { mlx_destroy_image(clist->wlist->wlx, clist->tlist[5].img); - clist->tlist[5].img = NULL; - clist->tlist[5].ptr = NULL; - } } if (clist->wlist->inited) { @@ -80,7 +62,6 @@ int } ft_free_lists(clist); ft_printf("Exiting program\n"); - while (1); exit(exit_code); return (0); } |