aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/player_thread.c')
-rw-r--r--src/player_thread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index dc263b6ad..c8f4f69f1 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -548,8 +548,10 @@ static gpointer player_task(G_GNUC_UNUSED gpointer arg)
void player_create(void)
{
GError *e = NULL;
- GThread *t;
- if (!(t = g_thread_create(player_task, NULL, FALSE, &e)))
+ assert(pc.thread == NULL);
+
+ pc.thread = g_thread_create(player_task, NULL, true, &e);
+ if (pc.thread == NULL)
g_error("Failed to spawn player task: %s", e->message);
}