aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_control.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/player_control.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/player_control.c b/src/player_control.c
index 60b5b8350..94d3aa938 100644
--- a/src/player_control.c
+++ b/src/player_control.c
@@ -90,7 +90,11 @@ void playerWait(void)
void playerKill(void)
{
+ assert(pc.thread != NULL);
+
player_command(PLAYER_COMMAND_EXIT);
+ g_thread_join(pc.thread);
+ pc.thread = NULL;
idle_add(IDLE_PLAYER);
}