aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_sfx_footstep.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_sfx_footstep.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ft_sfx_footstep.c b/src/ft_sfx_footstep.c
index a2eef1d..c0c9ffe 100644
--- a/src/ft_sfx_footstep.c
+++ b/src/ft_sfx_footstep.c
@@ -31,9 +31,12 @@ void
ref = (ref > 201) ? (0) : (ref + 1);
pthread_mutex_lock(&sfx->footstep_mutex);
if (ref % 2)
- system(sfx->footstep_one);
- else
- system(sfx->footstep_two);
+ {
+ if (system(sfx->footstep_one))
+ pthread_exit(NULL);
+ }
+ else if (system(sfx->footstep_two))
+ pthread_exit(NULL);
}
return (NULL);
}