aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_warp_level.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_warp_level.c')
-rw-r--r--src/ft_warp_level.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c
index 9a61484..866bd69 100644
--- a/src/ft_warp_level.c
+++ b/src/ft_warp_level.c
@@ -16,6 +16,7 @@
#include <stddef.h>
#include <stdint.h>
#include <mlx.h>
+#include <pthread.h>
static void
ft_del_map(t_map *ml)
@@ -28,6 +29,7 @@ static void
ft_memdel((void**)&ml->nl_tex_path);
ft_memdel((void**)&ml->nlevel_path);
ft_memdel((void**)&ml->music_path);
+ ft_memdel((void**)&ml->music_cmd);
ft_memdel((void**)&ml->mapl);
ft_free_words(ml->map);
ft_memdel((void**)&ml);
@@ -57,6 +59,11 @@ static void
cl->tlist[i].img = NULL;
i++;
}
+ if (cl->mlist->ismusic)
+ {
+ pthread_cancel(cl->tid);
+ pthread_exit(NULL);
+ }
}
int8_t