diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_exit.c | 2 | ||||
-rw-r--r-- | src/ft_treat_args.c | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c index 423350d..493e00f 100644 --- a/src/ft_exit.c +++ b/src/ft_exit.c @@ -53,7 +53,7 @@ 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); - if (clist->mlist->isnlvl && clist->tlist[5].img) + if (clist->tlist[5].img && clist->mlist->isnlvl) mlx_destroy_image(clist->wlist->wlx, clist->tlist[5].img); } if (clist->wlist->inited) diff --git a/src/ft_treat_args.c b/src/ft_treat_args.c index 338b54f..dab29ac 100644 --- a/src/ft_treat_args.c +++ b/src/ft_treat_args.c @@ -32,8 +32,6 @@ uint8_t uint8_t ft_use_args(int argc, const char *argv[], t_cub *clist) { - pthread_t tid; - if (argc < 3) { if (ft_init_winptr(clist) < 0) @@ -41,9 +39,7 @@ uint8_t ft_draw_scene(clist); if (clist->mlist->ismusic) { - pthread_create(&tid, NULL, ft_music_thread, clist); - /* pthread_join(tid, NULL); */ - + pthread_create(&clist->tid, NULL, ft_music_thread, clist); } ft_hooks_and_loops(clist->wlist, clist); } |