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.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c
index 56d4d67..dd4ed1b 100644
--- a/src/ft_warp_level.c
+++ b/src/ft_warp_level.c
@@ -39,7 +39,6 @@ static void
ft_memdel((void**)&ml->mapl);
ft_free_sprites(ml->sprite_path);
ft_free_words(ml->map);
- ft_free_words(ml->mcmd_words);
}
static void
@@ -74,15 +73,15 @@ static void
{
if (isoldmus && !cl->mlist.ismusic)
{
- kill(cl->mpid, SIGTERM);
- wait(&cl->mpid);
+ pthread_cancel(cl->mtid);
+ pthread_join(cl->mtid, NULL);
cl->isoldmus = 0;
}
else if (isoldmus && cl->mlist.ismusic
&& ft_strncmp(tmp_mup, cl->mlist.music_path, ft_strlen(tmp_mup) + 1))
{
- kill(cl->mpid, SIGTERM);
- wait(&cl->mpid);
+ pthread_cancel(cl->mtid);
+ pthread_join(cl->mtid, NULL);
ft_enable_music(cl);
}
else if (isoldmus && cl->mlist.ismusic